Hello I have the below code which I've put in the Visual Basic editor in excel:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
MsgBox "The 'Save and Save As' function has been disabled."
Cancel = True
End Sub
And it does what I want it to to prevent the user from using save or save as but when in the editor after I've put the code in how do I save it so that its saved to the workbook if this is disabled? Also how would you prevent using ctrl-S as well?
thanks for any help provided
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
MsgBox "The 'Save and Save As' function has been disabled."
Cancel = True
End Sub
And it does what I want it to to prevent the user from using save or save as but when in the editor after I've put the code in how do I save it so that its saved to the workbook if this is disabled? Also how would you prevent using ctrl-S as well?
thanks for any help provided