#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default print event

I want my beforeprint event code to execute only when the user prints the
document, not when the user switches to print preview. I tried creating a
button that would call a procedure to disable events, switch to print
preview, then re-enable events, but the user can then print from print
preview without executing the code for the beforeprint event.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default print event

The BeforePrint is rather anemic; it doesn't tell you what is
being printed (a range, a sheet, or a workbook) and doesn't
distinguish between printing and print preview. I don't think
there is any solid way to do what you want.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"xlcharlie" wrote in
message
...
I want my beforeprint event code to execute only when the user
prints the
document, not when the user switches to print preview. I tried
creating a
button that would call a procedure to disable events, switch to
print
preview, then re-enable events, but the user can then print
from print
preview without executing the code for the beforeprint event.



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
Print a range when an event happens kefee85 Excel Discussion (Misc queries) 4 February 16th 09 10:42 PM
user form-on open event? keydown event? FSt1[_3_] Excel Programming 2 August 5th 04 02:26 PM
Aborting from a "Before Print" Event Hotbird[_2_] Excel Programming 1 April 12th 04 10:52 AM
before print event not working goss[_17_] Excel Programming 2 January 29th 04 03:54 AM
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 08:56 PM.

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"