Macro to prevent saving

  • Thread starter Thread starter stols121
  • Start date Start date
A really determined user? No, can't be done. A casual user? In the
Workbook's BeforeSave event, put in the line

Cancel = True

and that will cancel the save.

HTH,
Bernie
MS Excel MVP
 
Hi
one way: Put the following code in your workbook module:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
MsgBox "Saving not allowed"
Cancel = True
End Sub
 
Back
Top