ThisWorkbook BeforePrint
Make sure that if you do this, you disable events prior to printing and
reenable them afterward, or you'll loop until you run out of stack
space. For instance:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
Application.EnableEvents = False
ActiveSheet.PrintOut
Application.EnableEvents = True
'Your code here
End Sub
In article ,
"Simon Shaw" <simonATsimonstoolsDOTcom wrote:
Hi,
I need to run code after a print job.
I am using
Private Sub Workbook_BeforePrint(Cancel As Boolean)
in ThisWorkbook to execute code prior to printing,
but then I want to run code after printing.
Thanks
Simon
|