Private Sub Command1_Click() Dim kCDl On Error Resume Next CommonDialog1.CancelError = True CommonDialog1.ShowPrinter 'MsgBox CommonDialog1.HelpKey If Err.Number <> 0 Then Exit Sub '如果异常退出过程 For kCDl = 1 To CommonDialog1.Copies Printer.Print Form1 Printer.NewPage Next MsgBox "打印完毕!", , "提示" End Sub
Private Sub Command1_Click() Dim kCDl On Error Resume Next CommonDialog1.CancelError = True CommonDialog1.ShowPrinter 'MsgBox CommonDialog1.HelpKey If Err.Number <> 0 Then Exit Sub '如果异常退出过程 For kCDl = 1 To CommonDialog1.Copies Printer.Print Form1 Printer.NewPage Next MsgBox "打印完毕!", , "提示" End Sub