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
 

Ask a Question

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.

Ask a Question

Back
Top