Before and After Print macro

  • Thread starter Thread starter CLR
  • Start date Start date
C

CLR

Hi All...........

If you please.........is it possible to construct a macro that will fire
Macro "A" as a "Before-print" event and Macro "B" as an "After-print" event
for the same print event.

TIA
Vaya con Dios,
Chuck, CABGx3
 
There is a workbook_beforeprint that you can tie into.

But there is no workbook_afterprint event.

maybe you could work off a timer???

Behind the ThisWorkbook module:

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)

'your beforeprint code here

Application.OnTime Now + TimeSerial(0, 0, 10), "RunAfterPrint"

End Sub

Then in a general module:

Option Explicit
Sub runAfterPrint()
'your code here
End Sub

(I waited 10 seconds. Adjust as necessary.)
 
Thanks Dave, for a very clever solution where no conventional one
exists...........

Vaya con Dios,
Chuck, CABGx3
 
Back
Top