Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Print Function
I have a workbook with several sheets in it, and allow others to view the
data but want to prohibit any printing of the data. I have used the "Set Print Area" to a specified empty cell on each worksheet, however others have found if they go to the "Name Box" and enter there cell there then they can click print and selection. Basically I just want a way to disable all printing functions within a workbook? Any help would be appreciated. Thank you... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Print Function
Hello,
Try this, In your VBAproject, put the following code into your "ThisWorkbook" code: Private Sub Workbook_BeforePrint(Cancel As Boolean) Cancel = True msgbox "Sorry ! Printing is disabled" End Sub "Sean" wrote: I have a workbook with several sheets in it, and allow others to view the data but want to prohibit any printing of the data. I have used the "Set Print Area" to a specified empty cell on each worksheet, however others have found if they go to the "Name Box" and enter there cell there then they can click print and selection. Basically I just want a way to disable all printing functions within a workbook? Any help would be appreciated. Thank you... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Print Function
With event code in Thisworkbook module you can cancel printing.
Private Sub Workbook_BeforePrint(Cancel As Boolean) MsgBox "you are not allowed to print" Cancel = True End Sub Users must have enabled macros or the above won't fire. To ensure they enable macros you must have a contingency plan which makes the workbook useless and unviewable if they disable macros. You also have to worry about them simply copy/pasting the data to another workbook. Or using a screen capture utility. Gord Dibben MS Excel MVP On Tue, 9 Feb 2010 15:38:01 -0800, Sean wrote: I have a workbook with several sheets in it, and allow others to view the data but want to prohibit any printing of the data. I have used the "Set Print Area" to a specified empty cell on each worksheet, however others have found if they go to the "Name Box" and enter there cell there then they can click print and selection. Basically I just want a way to disable all printing functions within a workbook? Any help would be appreciated. Thank you... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
disable print | Excel Discussion (Misc queries) | |||
How To Disable The File, Print... And The Print Button Functions | Excel Programming | |||
Disable print function on current workbook | Excel Programming | |||
Disable print not working | Excel Programming | |||
disable print | Excel Discussion (Misc queries) |