PC Review


Reply
Thread Tools Rate Thread

Disable print function on current workbook

 
 
=?Utf-8?B?QXZhbGFuY2hlTWlrZQ==?=
Guest
Posts: n/a
 
      9th Oct 2006
I need to be able to disable the print function for the current workbook
only, but I still want the print macro that I wrote to work. If the print
function is used without using the print macro, it'll print out 100 pages.

Thanks!
 
Reply With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      9th Oct 2006
Hi AvalancheMike

You can use this event in the thisworkbook module

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

Then in you macro use EnableEvents

Sub test()
Application.EnableEvents = False
ActiveSheet.PrintOut
Application.EnableEvents = True
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl



"AvalancheMike" <(E-Mail Removed)> wrote in message
news:5C726498-7E97-44DD-81D6-(E-Mail Removed)...
>I need to be able to disable the print function for the current workbook
> only, but I still want the print macro that I wrote to work. If the print
> function is used without using the print macro, it'll print out 100 pages.
>
> Thanks!



 
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
Disable print option of a worksheet/workbook =?Utf-8?B?TmVsbHkwNw==?= Microsoft Excel Misc 0 23rd Oct 2007 10:19 PM
Can you disable the save function from a shared workbook =?Utf-8?B?amNhbGxhaGFu?= Microsoft Excel Misc 2 3rd Apr 2007 02:11 AM
How to add a print current page function laurence chang Microsoft ASP .NET 2 29th Sep 2005 04:11 PM
disable print function 111 Microsoft Access Forms 8 12th May 2004 02:46 AM
Disable Print Button In a Single Workbook =?Utf-8?B?SGFtYm9uZQ==?= Microsoft Excel Programming 0 31st Jan 2004 12:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:10 PM.