ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to keep excel file from printing? (https://www.excelbanter.com/excel-discussion-misc-queries/66122-how-keep-excel-file-printing.html)

Tim

how to keep excel file from printing?
 
I want to be able to lock an excel file so that no one can print it, but they
can view the data. Is there a way to do this?

dominicb

how to keep excel file from printing?
 

Good afternoon Tim

Use something like this in the ThisWorkbook pane of the VBE:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
MsgBox "You can't print this spreadsheet"
End Sub

It will stop printing but it won't stop users being able to copy and
paste to another workbook to print, using the PrtScr button to collect
screen dumps etc.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=502948


Tim

how to keep excel file from printing?
 
I should add this is with office 2000/excel 2000

"Tim" wrote:

I want to be able to lock an excel file so that no one can print it, but they
can view the data. Is there a way to do this?


Tim

how to keep excel file from printing?
 
Dominic,

Thanks! That should do the trick..

"dominicb" wrote:


Good afternoon Tim

Use something like this in the ThisWorkbook pane of the VBE:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
MsgBox "You can't print this spreadsheet"
End Sub

It will stop printing but it won't stop users being able to copy and
paste to another workbook to print, using the PrtScr button to collect
screen dumps etc.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=502948




All times are GMT +1. The time now is 02:33 PM.

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