O
Olly
I am trying to crate some code that asks the user if they want to
print and if the computer encounters an error because there is no
printer installed. How can I adapt my code bellow to allow this to
happen?
Sub PrintInvoice()
Dim Res As Long
Res = MsgBox("Do you want to print the invoice?", vbQuestion +
vbYesNo)
Select Case Res
Case vbYes
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Dim Res As Error
Cas Error("1004")
MsgBox "Error: No print has been found on your
system", vbOKCancel + vbInformation
Case vbNo
Exit Sub
End Select
End Sub
Thanks
Olly
print and if the computer encounters an error because there is no
printer installed. How can I adapt my code bellow to allow this to
happen?
Sub PrintInvoice()
Dim Res As Long
Res = MsgBox("Do you want to print the invoice?", vbQuestion +
vbYesNo)
Select Case Res
Case vbYes
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Dim Res As Error
Cas Error("1004")
MsgBox "Error: No print has been found on your
system", vbOKCancel + vbInformation
Case vbNo
Exit Sub
End Select
End Sub
Thanks
Olly