See if this related thread helps.
http://www.mrexcel.com/board/viewtop...1033&forum=2&4
Tom Urtis
I created a workbook in Excel that is viewed only by a select number of mgrs within my company. The workbook is password protected (both the open and to modify) in a shared drive. My superiors just asked if there was a way I could set it up that people could view the workbook but not be able to print it. Does anyone know of a way? Many thanks!
_________________
Beth
[ This Message was edited by: ejd0077 on 2002-03-05 14:50 ]
Thank you for your quick reply... The suggestions look just like what I am needing.
The workbook uses a pivot table that the mgrs can use to select different areas, so I think I am going to use the VB code instead of setting the print area and turning the sheet protection on.
AGAIN - many thanks. I would have researched this for days (probably to no avail).
_________________
Beth
[ This Message was edited by: ejd0077 on 2002-03-06 06:38 ]
I enterd the following VB code:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
End Sub
It is still printing... Any suggestions.
Beth: Where are you putting the code? It needs to be in the WorkBook module. Right click on the Excel Icon next to the workbook name in the title bar and choose View Code to open the module. Paste the code here. You can also access the Workbook module from the VBA editor (ThisWorkbook)
You were right!!! I was putting the code in the wrong place. After moving it to ThisWorkbook, it worked just fine!
I appreciate your help. I was getting a little anxious.
Like this thread? Share it with others