Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Canceling a print job

What is the correct syntax in VBA to cancel a print job?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Canceling a print job

There is no VBA syntax for this that I am aware of. You would probably have
to use the Window's api.

--
Regards,
Tom Ogilvy


"Dan Scholler" wrote in message
...
What is the correct syntax in VBA to cancel a print job?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Canceling a print job

If you mean the print job has already started, there's no way in VBA to abort
it.

OTOH, if you mean the user tries to print and you want to prevent that, you
can do that with an event macro.

In the ThisWorkbook module, select the Workbook_BeforePrint sub. That sub has
a Cancel argument. If your code sets it to True, printing is cancelled.


On Sun, 8 Aug 2004 18:20:26 -0700, "Dan Scholler"
wrote:

What is the correct syntax in VBA to cancel a print job?


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
canceling simplifying my fractions HI New Users to Excel 1 July 5th 21 12:47 PM
Self canceling checkboxes Glenn Excel Discussion (Misc queries) 3 October 28th 08 03:11 PM
canceling auto date update unexceller New Users to Excel 1 June 8th 06 07:40 AM
Canceling a UserForm Eric W. Excel Programming 1 August 26th 03 06:56 PM
Canceling a Macro that Has Been Scheduled Murray Williams Excel Programming 2 July 25th 03 11:28 PM


All times are GMT +1. The time now is 02:19 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"