I use following code to stop people from saving my workbooks, if they use the Save or Saveas buttons/menu options. it has to go in the ThisWorkbook object.
Private Sub workbook_beforesave(ByVal SaveAsUI As Boolean, cancel As Boolean)
MsgBox ("Sorry you cannot save this workbook using this method")
SaveAsUI = False
cancel = True
End Sub
Many thanks Simon for you help! Works great!
One more question Simon Re: Not saving changes
The code works great. However is there some way to save changes to one sheet. But have the document protected against being saved, by using your code?
Thanks
Re: One more question Simon Re: Not saving changes
I am working on this myself, at the moment I have a command button on the worksheet I need to save, this is linked to a macro which just copies the sheet to a new workbook and then I can save the new workbook. I find this method a bit messy but it works for the moment, I would welcome any suggestion for a better method.