hi, Michelle !
I want to alter a sheet when the user goes into print preview (no problem with that - I use the BeforePrint event)
But I want to put it back to normal when the user closes print peview.
Is there an event I can use to put it back? - a sort of 'AfterPrintPreview' event...
(AFAIK) *IF* the user goes first into a print preview, '_beforeprint' event could it be triggered twice
- one when print preview is choosen
- once more *IF* the user chooses *print* from there
also, the print preview (dialog) can be closed either by *cancel* or *print*, so...
- which one do you think should it be "controlled" ?
(FWIW) you can simulate an '_afterprint' event by using a normal procedure
-> called by "OnTime" in '_beforeprint' event (i.e.)
== in ThisWorkbook code module ==
Private Sub Workbook_BeforePrint(Cancel As Boolean)
' do your stuff here, and...
' when the user releases the control (from the dialog) to the application... '
Application.OnTime Now, "afterprint_macro"
End Sub
== in a standard code module ==
Private Sub AfterPrint_Macro()
' here goes your afterPrint actions ... '
End Sub
hth,
hector.