protect a sheet from being printed?

J

JE McGimpsey

Prevent? Yes, it's impossible.

Make it somewhat difficult for a novice user? Sure. Put this in the
ThisWorkbook module of your workbook:


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

However, this will not prevent anyone from printing a screenshot.
 
R

R. Choate

Also, if the user doesn't have macros enabled then it will have no effect at all and the user can print away with no hint of
trouble.
 
A

Abhishek kedia

Hi
JE McGimpsey

I tried it, but unforunitly it does not work, can u explain in detail

Thanks

Abhishek kedia
 
J

JE McGimpsey

Abhishek kedia said:
I tried it, but unforunitly it does not work, can u explain in detail

Not sure I can explain in any more detail than my original reply...

- Did you put the code in the ThisWorkbook code module?

- Are macros enabled?

- Did you set a breakpoint in the code to see if it fired when you tried
to print?
 
Top