Archive for the cateroy Excel VBA

  

Disable Printing in a Workbook

Hi,
in order to disble printing in a specific workbook, please continue with the steps as described below.
Open the Visal Basic Editor (ALT + F11)
Double Click “This Workbook” in the Project Explorer
Hit CTRL + R if the Project Explorer isn’t shown
Paste this code
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
MsgBox “Printing has been disabled”, vbOKOnly, “Information”
End Sub

Enjoy
Stefaan