Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default BeforePrint event

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default BeforePrint event

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default BeforePrint event

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default BeforePrint event

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
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
BeforePrint Event - "PrintOut" does not give Print Dialog Ronny Hamida Excel Programming 2 October 11th 06 04:04 PM
printing macro,want to use beforeprint event? paul Excel Programming 1 July 2nd 06 08:05 PM
Execute code after printing with the BeforePrint event mikeburg[_38_] Excel Programming 1 October 2nd 05 06:27 AM
BeforePrint Event Woody[_4_] Excel Programming 2 July 20th 05 09:48 AM
BeforePrint event EnglishTeacher Excel Programming 4 October 13th 04 04:17 PM


All times are GMT +1. The time now is 11:34 PM.

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"