LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Running Custom Code if "Entire Workbook" is Selected for Printing

That is an Excel (as opposed to a Windows) dialog and Excel does not expose
these settings (in say a JustBeforePrint event), so you cannot tell.
The easiest way would be to fake your own print dialog on a userform and use
that.
If you don't need/want to to the whole thing, maybe a simple:
InpuBox="Are you going to print the whole WB ?"
would surfice in the _BeforePrint event, if you trust the users will answer
correctly.

NickHK

"rfedge" <u26408@uwe ¼¶¼g©ó¶l¥ó·s»D:660c7b8ed7bea@uwe...
I would like to run some custom VBA code before printing an Excel workbook,
but only if the user has selected the option to print the Entire Workbook.
Does anyone know how I can determine if the user has selected "Entire
Workbook" from the print dialog? (The "BeforePrint" event occurs BEFORE
the
print dialog is displayed; I want to run my code AFTER the print dialog
has
been displayed, and then only if the user has selected the Entire Workbook
be
printed).

Thanks very much!

Rob



 
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
Printing Selected worksheets but exclude the sheet "Sheets" Dolphinv4 Excel Discussion (Misc queries) 1 January 3rd 08 12:13 PM
"Running Virus Scan" ....On Opening Excel Workbook Dermot Excel Discussion (Misc queries) 1 August 30th 07 09:17 PM
Removing "Spaces" Entire Workbook carl Excel Worksheet Functions 2 June 6th 06 04:56 PM
Stop code from running when I click "Cancel" Dean[_9_] Excel Programming 3 March 2nd 06 12:34 AM
"Casing" the strings for smooth code running Hari[_3_] Excel Programming 2 June 16th 04 04:41 PM


All times are GMT +1. The time now is 12:15 AM.

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

About Us

"It's about Microsoft Excel"