Michaels
Active Member
- Joined
- Apr 2, 2009
- Messages
- 404
Hello,
I am trying to use the following code for disabling "save as" in workbook_before save event for preventing the user to save a new copy of my workbook. However, I want to enable "save" (as in when someone presses Ctrl + S).
Here is my code:
So my question is: How can I enable Save only and disable Save as ?
Thank you for your help.
I am trying to use the following code for disabling "save as" in workbook_before save event for preventing the user to save a new copy of my workbook. However, I want to enable "save" (as in when someone presses Ctrl + S).
Here is my code:
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI Then
MsgBox "Save As is disabled.", vbInformation, "Save As Error"
Cancel = True
End If
End Sub
So my question is: How can I enable Save only and disable Save as ?
Thank you for your help.