View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Charabeuh[_5_] Charabeuh[_5_] is offline
external usenet poster
 
Posts: 8
Default 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...