Hello gurus! First of all, OHARAB sent a solution under another thread that was very involved, but I'm willing to do if necessary, BUT I ALWAYS PREFER THE TIGHTEST CLEANEST CODE POSSIBLE. T H E R E ' S G O T T O B E A B E T T E R W A Y ! ! !
Here's my scenario:
I've got a VBA function (invoked from EXCEL) which generates several different output mediums for numerous entities. I've recently employed "EnableCancelKey" to trap the escape key (1) preventing the user from interrupting code, and (2) permitting a controlled stop of an ongoing routine.
HOWEVER, when printed and/or PDF outputs are being processed, the "Printing" dialog appears with the CANCEL button. This dialog nullifies my coding above because if escape if enter whil the dialog is up (or the cancel button is clicked), my code is interrupted. IS THERE ANYWAY TO SHUT THIS PRINTING DIALOG OFF??? I've scanned the online world and have only seen the same suppress code supplied by Ben Oharab.
FYI - Application.DisplayAlerts = False does not work. Nor do the follwing:
CancelKeyEnabled = xlerrorhandler
application.interface = false
Thanks in advance!!!
Here's my scenario:
I've got a VBA function (invoked from EXCEL) which generates several different output mediums for numerous entities. I've recently employed "EnableCancelKey" to trap the escape key (1) preventing the user from interrupting code, and (2) permitting a controlled stop of an ongoing routine.
HOWEVER, when printed and/or PDF outputs are being processed, the "Printing" dialog appears with the CANCEL button. This dialog nullifies my coding above because if escape if enter whil the dialog is up (or the cancel button is clicked), my code is interrupted. IS THERE ANYWAY TO SHUT THIS PRINTING DIALOG OFF??? I've scanned the online world and have only seen the same suppress code supplied by Ben Oharab.
FYI - Application.DisplayAlerts = False does not work. Nor do the follwing:
CancelKeyEnabled = xlerrorhandler
application.interface = false
Thanks in advance!!!