PC Review


Reply
Thread Tools Rate Thread

BeforePrint event

 
 
=?Utf-8?B?RGF2ZSBTaGF3?=
Guest
Posts: n/a
 
      4th May 2007
I have the following macro in Excel 2003:

Private Sub workbook_BeforePrint(Cancel As Boolean)
Cancel = True
End Sub

The aim is to prevent printing. It does not seem to do anything but I don't
know why. Can anyone help?

Thanks

Dave
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      4th May 2007
Have events been disabled - or macros disabled.

--
regards,
Tom Ogilvy


"Dave Shaw" wrote:

> I have the following macro in Excel 2003:
>
> Private Sub workbook_BeforePrint(Cancel As Boolean)
> Cancel = True
> End Sub
>
> The aim is to prevent printing. It does not seem to do anything but I don't
> know why. Can anyone help?
>
> Thanks
>
> Dave

 
Reply With Quote
 
=?Utf-8?B?RGF2ZSBTaGF3?=
Guest
Posts: n/a
 
      4th May 2007
Macros are enabled and I think events are enabled:

Med = Application.EnableEvents

results in True.


"Tom Ogilvy" wrote:

> Have events been disabled - or macros disabled.
>
> --
> regards,
> Tom Ogilvy
>
>
> "Dave Shaw" wrote:
>
> > I have the following macro in Excel 2003:
> >
> > Private Sub workbook_BeforePrint(Cancel As Boolean)
> > Cancel = True
> > End Sub
> >
> > The aim is to prevent printing. It does not seem to do anything but I don't
> > know why. Can anyone help?
> >
> > Thanks
> >
> > Dave

 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      4th May 2007
If events work and macros are enabled bad that code is in the ThisWorkbook
module, I would expect that to block the printing of information in the
sheets of that workbook.

--
Regards,
Tom Ogilvy


"Dave Shaw" wrote:

> Macros are enabled and I think events are enabled:
>
> Med = Application.EnableEvents
>
> results in True.
>
>
> "Tom Ogilvy" wrote:
>
> > Have events been disabled - or macros disabled.
> >
> > --
> > regards,
> > Tom Ogilvy
> >
> >
> > "Dave Shaw" wrote:
> >
> > > I have the following macro in Excel 2003:
> > >
> > > Private Sub workbook_BeforePrint(Cancel As Boolean)
> > > Cancel = True
> > > End Sub
> > >
> > > The aim is to prevent printing. It does not seem to do anything but I don't
> > > know why. Can anyone help?
> > >
> > > Thanks
> > >
> > > Dave

 
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
BeforePrint event - Jim Thomlinson / pwrichcreek Paul D Byrne. Microsoft Excel Programming 0 3rd Jun 2008 08:21 AM
printing macro,want to use beforeprint event? =?Utf-8?B?cGF1bA==?= Microsoft Excel Programming 1 2nd Jul 2006 08:05 PM
Word BeforePrint Event is not raised =?Utf-8?B?bm11ZWdnbGVy?= Microsoft Dot NET 2 12th Aug 2005 11:15 AM
BeforePrint Event Woody Microsoft Excel Programming 2 20th Jul 2005 09:48 AM
BeforePrint event =?Utf-8?B?RW5nbGlzaFRlYWNoZXI=?= Microsoft Excel Programming 4 13th Oct 2004 04:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:01 AM.