ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   protect a sheet from being printed? (https://www.excelbanter.com/excel-discussion-misc-queries/85959-protect-sheet-being-printed.html)

RVal

protect a sheet from being printed?
 
I am trying to stop anyone from printing a spreadsheet. Is this possible?

JE McGimpsey

protect a sheet from being printed?
 
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.


In article ,
RVal wrote:

I am trying to stop anyone from printing a spreadsheet. Is this possible?


R. Choate

protect a sheet from being printed?
 
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.

--
RMC,CPA


"RVal" wrote in message ...
I am trying to stop anyone from printing a spreadsheet. Is this possible?



Abhishek kedia

protect a sheet from being printed?
 

Hi
JE McGimpsey

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

Thanks

Abhishek kedia
"JE McGimpsey" wrote:

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.


In article ,
RVal wrote:

I am trying to stop anyone from printing a spreadsheet. Is this possible?



JE McGimpsey

protect a sheet from being printed?
 
In article ,
Abhishek kedia wrote:

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?


All times are GMT +1. The time now is 02:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com