求用 Printer 对象打印报表的完整列子 试试OrchidPrinterwww.orient-orchid.com 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Private Sub PrintReport_Click() Call PrintTable Call PrintData Printer.EndDoc End SubPrivate Sub PrintTable() Printer.ScaleMode = 3 Printer.Font = "宋体" Printer.FontSize = 13' Printer.FontBold = True Printer.CurrentX = 52: Printer.CurrentY = 0 Printer.Print "报表标题" ' Printer.DrawWidth = 2 Printer.Line (20, 25)-(375, 349), , B Printer.Line (155, 25)-(155, 349) Dim i As Long For i = 1 To 9 Printer.Line (20, 25 + i * 36)-(375, 25 + i * 36) Next i Printer.CurrentX = 48: Printer.CurrentY = 38 Printer.Print "年 限" Printer.CurrentX = 48: Printer.CurrentY = 74 Printer.Print "地 区" Printer.CurrentX = 48: Printer.CurrentY = 110 Printer.Print "类 别" Printer.CurrentX = 48: Printer.CurrentY = 146 Printer.Print "等 级" Printer.CurrentX = 41: Printer.CurrentY = 182 Printer.Print "班、线" Printer.CurrentX = 48: Printer.CurrentY = 218 Printer.Print "线 检" Printer.CurrentX = 41: Printer.CurrentY = 254 Printer.Print "质检员" Printer.CurrentX = 48: Printer.CurrentY = 290 Printer.Print "重 量" Printer.CurrentX = 48: Printer.CurrentY = 326 Printer.Print "签 名" Printer.CurrentX = 20: Printer.CurrentY = 359 Printer.Print "日期:" Printer.CurrentX = 20: Printer.CurrentY = 374 Printer.Print "时间:" Printer.CurrentX = 20: Printer.CurrentY = 389 Printer.Print "序号:" End SubPrivate Sub PrintData() Printer.CurrentX = 177: Printer.CurrentY = 38 Printer.Print "2002年" Printer.CurrentX = 177: Printer.CurrentY = 74 Printer.Print "reyre" Printer.CurrentX = 177: Printer.CurrentY = 110 Printer.Print "ryre" Printer.CurrentX = 177: Printer.CurrentY = 146 Printer.Print "dhre" Printer.CurrentX = 177: Printer.CurrentY = 182 Printer.Print "一班" Printer.CurrentX = 177: Printer.CurrentY = 290 Printer.Print "453" & " kg" Printer.CurrentX = 106: Printer.CurrentY = 359 Printer.Print Format(Date, "YYYY-MM-DD") Printer.CurrentX = 106: Printer.CurrentY = 374 Printer.Print Format(Time, "HH:MM:SS") Printer.CurrentX = 106: Printer.CurrentY = 389 Printer.Print "3234" End Sub VB 时间间隔的问题 VB窗体模式问题 DataTree示例的Tag VB编程求解啊~~中文大写数字转换成阿拉伯数字 关于datareport VB制作ActiveX的例子 类不支持自动化或预期的窗口 用VB调用Excel,可是填充后,有些表格要高些,也不存在换行问题啊 如何windowsXP风格的界面! 为什么我的问题没人回答?再贴遍 为什么邦定数据到textbox会出错 急!急!急!!!再线等候!!!!
Call PrintTable
Call PrintData
Printer.EndDoc
End SubPrivate Sub PrintTable()
Printer.ScaleMode = 3
Printer.Font = "宋体"
Printer.FontSize = 13
' Printer.FontBold = True
Printer.CurrentX = 52: Printer.CurrentY = 0
Printer.Print "报表标题"
' Printer.DrawWidth = 2
Printer.Line (20, 25)-(375, 349), , B
Printer.Line (155, 25)-(155, 349)
Dim i As Long
For i = 1 To 9
Printer.Line (20, 25 + i * 36)-(375, 25 + i * 36)
Next i
Printer.CurrentX = 48: Printer.CurrentY = 38
Printer.Print "年 限"
Printer.CurrentX = 48: Printer.CurrentY = 74
Printer.Print "地 区"
Printer.CurrentX = 48: Printer.CurrentY = 110
Printer.Print "类 别"
Printer.CurrentX = 48: Printer.CurrentY = 146
Printer.Print "等 级"
Printer.CurrentX = 41: Printer.CurrentY = 182
Printer.Print "班、线"
Printer.CurrentX = 48: Printer.CurrentY = 218
Printer.Print "线 检"
Printer.CurrentX = 41: Printer.CurrentY = 254
Printer.Print "质检员"
Printer.CurrentX = 48: Printer.CurrentY = 290
Printer.Print "重 量"
Printer.CurrentX = 48: Printer.CurrentY = 326
Printer.Print "签 名"
Printer.CurrentX = 20: Printer.CurrentY = 359
Printer.Print "日期:"
Printer.CurrentX = 20: Printer.CurrentY = 374
Printer.Print "时间:"
Printer.CurrentX = 20: Printer.CurrentY = 389
Printer.Print "序号:"
End SubPrivate Sub PrintData()
Printer.CurrentX = 177: Printer.CurrentY = 38
Printer.Print "2002年"
Printer.CurrentX = 177: Printer.CurrentY = 74
Printer.Print "reyre"
Printer.CurrentX = 177: Printer.CurrentY = 110
Printer.Print "ryre"
Printer.CurrentX = 177: Printer.CurrentY = 146
Printer.Print "dhre"
Printer.CurrentX = 177: Printer.CurrentY = 182
Printer.Print "一班"
Printer.CurrentX = 177: Printer.CurrentY = 290
Printer.Print "453" & " kg"
Printer.CurrentX = 106: Printer.CurrentY = 359
Printer.Print Format(Date, "YYYY-MM-DD")
Printer.CurrentX = 106: Printer.CurrentY = 374
Printer.Print Format(Time, "HH:MM:SS")
Printer.CurrentX = 106: Printer.CurrentY = 389
Printer.Print "3234"
End Sub