In fact, why not do this:
![]()
Public Sub Workbook_BeforePrint(Cancel As Boolean) PrintDoc Cancel = True End Sub
Then you effectively cancel normal printing, and do the add-in printing instead, without the necessity for an error message.![]()
Public Sub PrintDoc() Name = UCase(Application.UserName) ctrlNbr = "12345" Call PrintDocX(Name, ctrlNbr) End Sub
Bookmarks