主题:不能二张表格(证、表)都打印,请帮助看看
不能二张表格(证、表)都打印,请帮助看看
Dim Date1 As Date, Date2 As Date
Dim A As Integer
Dim B, D, E, F, G, H, I, J, K As Integer
Private Sub Command1_Click() '打印键
If Check1.Value = 1 Then Call 装修施工费用表
If Option2.Value = 1 Then Call 临时进场证
end Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Label28 = "m2"
Check1.Value = 1
Option2.Value = 1
End Sub
Private Sub Timer1_Timer()
Label3 = Format(Date, "dddddd")
End Sub
Public Sub 装修施工费用表()
Printer.Orientation = 1 '设定打印方向为纵向
Printer.PaperSize = 9 '设定打印纸为A4
Printer.ScaleMode = 6 '设定打印单位为毫米
Printer.PrintQuality = -4 '设定打印为高分辨率
Printer.ColorMode = 1 '设定打印为黑白
Printer.DrawStyle = 0 '设定打印为实线
Printer.DrawWidth = 5 '线宽为5
Printer.Line (28, 44)-(190, 44) '打印最上线
Printer.Line (28, 228)-(190, 228) '打印最下线
Printer.Line (28, 44)-(28, 228) '打印右竖线
Printer.Line (190, 44)-(190, 228) '打印左竖线
Printer.EndDoc '将打印内容送打印机
Printer.KillDoc '打印完毕,关闭打印机
End Sub
Public Sub 临时进场证()
Printer.Orientation = 1 '设定打印方向为纵向
Printer.PaperSize = 9 '设定打印纸为A4
Printer.ScaleMode = 6 '设定打印单位为毫米
Printer.PrintQuality = -4 '设定打印为高分辨率
Printer.ColorMode = 1 '设定打印为黑白
Printer.FontBold = 7 '字加粗为7,第一行
Printer.FontName = "宋体"
Printer.FontSize = 40 '打印大表头
Printer.CurrentX = 73
Printer.CurrentY = 19
Printer.Print "临时"
Printer.FontBold = 4 '字加粗为4
Printer.FontName = "宋体"
Printer.FontSize = 25 '打印大表头
Printer.CurrentX = 102
Printer.CurrentY = 22
Printer.Print "进场证"
Printer.EndDoc '将打印内容送打印机
Printer.KillDoc '打印完毕,关闭打印机
End Sub
Dim Date1 As Date, Date2 As Date
Dim A As Integer
Dim B, D, E, F, G, H, I, J, K As Integer
Private Sub Command1_Click() '打印键
If Check1.Value = 1 Then Call 装修施工费用表
If Option2.Value = 1 Then Call 临时进场证
end Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Label28 = "m2"
Check1.Value = 1
Option2.Value = 1
End Sub
Private Sub Timer1_Timer()
Label3 = Format(Date, "dddddd")
End Sub
Public Sub 装修施工费用表()
Printer.Orientation = 1 '设定打印方向为纵向
Printer.PaperSize = 9 '设定打印纸为A4
Printer.ScaleMode = 6 '设定打印单位为毫米
Printer.PrintQuality = -4 '设定打印为高分辨率
Printer.ColorMode = 1 '设定打印为黑白
Printer.DrawStyle = 0 '设定打印为实线
Printer.DrawWidth = 5 '线宽为5
Printer.Line (28, 44)-(190, 44) '打印最上线
Printer.Line (28, 228)-(190, 228) '打印最下线
Printer.Line (28, 44)-(28, 228) '打印右竖线
Printer.Line (190, 44)-(190, 228) '打印左竖线
Printer.EndDoc '将打印内容送打印机
Printer.KillDoc '打印完毕,关闭打印机
End Sub
Public Sub 临时进场证()
Printer.Orientation = 1 '设定打印方向为纵向
Printer.PaperSize = 9 '设定打印纸为A4
Printer.ScaleMode = 6 '设定打印单位为毫米
Printer.PrintQuality = -4 '设定打印为高分辨率
Printer.ColorMode = 1 '设定打印为黑白
Printer.FontBold = 7 '字加粗为7,第一行
Printer.FontName = "宋体"
Printer.FontSize = 40 '打印大表头
Printer.CurrentX = 73
Printer.CurrentY = 19
Printer.Print "临时"
Printer.FontBold = 4 '字加粗为4
Printer.FontName = "宋体"
Printer.FontSize = 25 '打印大表头
Printer.CurrentX = 102
Printer.CurrentY = 22
Printer.Print "进场证"
Printer.EndDoc '将打印内容送打印机
Printer.KillDoc '打印完毕,关闭打印机
End Sub