If you'd like to prevent anyone from printing your workbook, this code will do the trick (subject to the caveat below).
Macro Weaknesses
- If someone disables macros, your code will not run
Versions Tested:
These macros have been tested with Excel 2010, but should also work in Excel 97 and higher without any modifications.
Prevent Printing Any Worksheet In A Workbook:
The following code will prevent printing any worksheet in the workbook, and goes in the ThisWorkbook module. (If you need help with this, click here.)
Code:
Private Sub Workbook_BeforePrint(Cancel As Boolean) Cancel = True End Sub