Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Very good, thanks, the on-time solution works a treat.
M "Héctor Miguel" wrote in message ... 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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Print & Close Buttons in Print Preview grayed-out when '07 script | Excel Programming | |||
Bind Event Prior to Print Preview | Excel Programming | |||
Handling Print Preview Event | Excel Programming | |||
Macro to include Close Print Preview | Charts and Charting in Excel | |||
how to close print preview | Excel Worksheet Functions |