Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default afterprint event?

there is an workbook beforeprint event, that is triggered when you start
printing.
is there some event [or some way to simulate it] that will be triggered when
the print job is generated and sent to the spooler/printer?

reason:
i have some fancy formating that is nice when you look at the screen, but is
not acceptable to be printed on the b/w laser
so, beforeprint event easily remove that formating when going to print, but
how to restore that formating automaticly after print is done?

[version: excel 2000]

thnx!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default afterprint event?

Hi,

You might try this:-

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Static Printit As Boolean
If Printit = True Then Exit Sub
Printit = True
ActiveSheet.PrintOut

'This code executes after printing
MsgBox "Print comp" 'Delete this line and put your own code in
Printit = False
Cancel = True
End Sub

Mike

"sali" wrote:

there is an workbook beforeprint event, that is triggered when you start
printing.
is there some event [or some way to simulate it] that will be triggered when
the print job is generated and sent to the spooler/printer?

reason:
i have some fancy formating that is nice when you look at the screen, but is
not acceptable to be printed on the b/w laser
so, beforeprint event easily remove that formating when going to print, but
how to restore that formating automaticly after print is done?

[version: excel 2000]

thnx!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default afterprint event?

thnx!

nice idea to use eventproc itself to cancel its own event [suicide]


"Mike H" je napisao u poruci interesnoj
...
Hi,

You might try this:-

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Static Printit As Boolean
If Printit = True Then Exit Sub
Printit = True
ActiveSheet.PrintOut



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Click event on menu item is lost after first time firing of the event [email protected] Excel Programming 1 April 2nd 07 01:25 PM
MsgBox in Enter event causes combobox not to run Change event Richard Excel Programming 0 March 6th 06 02:52 PM
How to trap delete row event and hide column event? Alan Excel Programming 3 April 26th 05 04:25 PM
user form-on open event? keydown event? FSt1[_3_] Excel Programming 2 August 5th 04 02:26 PM
OnTime event not firing in Workbook_Open event procedure GingerTommy Excel Programming 0 September 24th 03 03:18 PM


All times are GMT +1. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"