报错实时错误、自动化错误
上个帖子还没问完就被强制结贴了。。。接着问。。。运行报错,如下红色部分Private Sub cmd_start_Click()
num_printed = 0
num_printing = printing.Caption '需要打印数量
num_printed = printed.Caption '已打印数量
num_s = "0"
Do Until num_printing = 0
If num_s = "0" Then
Set mydocs = myapp.Documents
Set mydoc = mydocs.Open(App.Path & "\" & file.Text)
num_printing = num_printing - 1
num_printed = num_printed + 1
printing.Caption = num_printing
printed.Caption = num_printed
mydoc.PrintLabel 1
End If
mydoc.FormFeed
mydocs.CloseAll 这里报错:实时错误 -2147417848(80010108) 自动化错误
Comm
DoEvents
Loop
If num_printing = 0 Then
cmd_start.Enabled = False
End If
End Sub