How to stop someone printing from an Excel workbook
Q I want to be able prevent a user from printing any of the data contained in an Excel workbook. Can you help?
A You can use a macro to do this. Press Alt & F11 to open the VBA for Excel editor. Double-click on ThisWorkbook in the left-hand panel. In the right-hand panel enter:
Private Sub workbook_BeforePrint(Cancel As Boolean) Cancel = True MsgBox “You cannot print this workbook”, vbInformation End Sub
Close the VBA editor and save the file. The Message Box is optional, but if a message is not displayed when someone tries to print the file they might think there is a problem with their computer. This macro will prevent the print preview being shown with Ctrl & F2. The workbook can’t be printed either via the regular menus or the keyboard shortcut Ctrl & P.
This answers your question, but bear in mind there is little total security in Excel. There are many ways users can extract data, formulas or graphics from a spreadsheet.