PC Review


Reply
Thread Tools Rate Thread

Cancel Print

 
 
=?Utf-8?B?REc=?=
Guest
Posts: n/a
 
      9th Aug 2007
Excel 2003 - this code will still show the print dialog box. Is there anyway
to avoid it?

Public Sub Workbook_BeforePrint(Cancel As Boolean)
MsgBox "No printing for you!"
Cancel = True
End Sub

 
Reply With Quote
 
 
 
 
Jim Cone
Guest
Posts: n/a
 
      9th Aug 2007

On Windows XP with Excel 2002 or Excel 2003 running...
all I see is the message box, the print dialog box is not shown.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"DG" <(E-Mail Removed)>
wrote in message
Excel 2003 - this code will still show the print dialog box. Is there anyway
to avoid it?

Public Sub Workbook_BeforePrint(Cancel As Boolean)
MsgBox "No printing for you!"
Cancel = True
End Sub

 
Reply With Quote
 
JE McGimpsey
Guest
Posts: n/a
 
      9th Aug 2007
I don't see it in XL04 or XL03...

Do you have events enabled?

In article <AD71F8B3-F0E9-4CA1-AA5F-(E-Mail Removed)>,
DG <(E-Mail Removed)> wrote:

> Excel 2003 - this code will still show the print dialog box. Is there anyway
> to avoid it?
>
> Public Sub Workbook_BeforePrint(Cancel As Boolean)
> MsgBox "No printing for you!"
> Cancel = True
> End Sub

 
Reply With Quote
 
=?Utf-8?B?REc=?=
Guest
Posts: n/a
 
      9th Aug 2007
Yes, but if I disable events then I will never see another prompt. So at what
point do I re-enable the events?

"JE McGimpsey" wrote:

> I don't see it in XL04 or XL03...
>
> Do you have events enabled?
>
> In article <AD71F8B3-F0E9-4CA1-AA5F-(E-Mail Removed)>,
> DG <(E-Mail Removed)> wrote:
>
> > Excel 2003 - this code will still show the print dialog box. Is there anyway
> > to avoid it?
> >
> > Public Sub Workbook_BeforePrint(Cancel As Boolean)
> > MsgBox "No printing for you!"
> > Cancel = True
> > End Sub

>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      9th Aug 2007
Disable events for as short a period as you need.
Do what you need to do with the events disabled
Enable events



DG wrote:
>
> Yes, but if I disable events then I will never see another prompt. So at what
> point do I re-enable the events?
>
> "JE McGimpsey" wrote:
>
> > I don't see it in XL04 or XL03...
> >
> > Do you have events enabled?
> >
> > In article <AD71F8B3-F0E9-4CA1-AA5F-(E-Mail Removed)>,
> > DG <(E-Mail Removed)> wrote:
> >
> > > Excel 2003 - this code will still show the print dialog box. Is there anyway
> > > to avoid it?
> > >
> > > Public Sub Workbook_BeforePrint(Cancel As Boolean)
> > > MsgBox "No printing for you!"
> > > Cancel = True
> > > End Sub

> >


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to cancel printing or to delete a print job that is stuck in the print queue in Windows XP Alan Morris [MSFT] Windows XP Print / Fax 6 30th May 2008 06:23 PM
unable to cancel print jobs, printer won't print =?Utf-8?B?TGl6?= Windows XP Print / Fax 2 15th Jan 2007 04:21 AM
Print Operator cannot cancel a Print Job - Strange!! jfkind@gmail.com Microsoft Windows 2000 Printing 0 9th Mar 2006 10:04 PM
document won't print and can cancel from print queue pj Windows XP Print / Fax 1 10th Oct 2004 05:26 AM
Epson Stylus C82 / Linksys Etherfast EFSP42 Print Server / Linux and Windows 98 / CANCEL PRINT JOB Dougie Nisbet Printers 2 9th Nov 2003 04:49 PM


Features
 

Advertising
 

Newsgroups
 


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