You can copy/paste this into the ThisWorkBook code module :-
'---------------------------------------------------------
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
MsgBox ("Printing not allowed.")
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Cancel = True
MsgBox ("Saving not allowed.")
End Sub
'----------------------------------------------------------
If you actually want to 'Disable' the save and print buttons to try an
discourage your user to press them you can do the following:
Application.CommandBars("Standard").Controls("Save").Enabled = False
Application.CommandBars("Standard").Controls("Print (EPSON Stylu
Photo 915)").Enabled = False
It took a while to realise that I needed to put the full name of th
print button in and not just ("Print"). You can find this name in cod
by returning the caption property
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.