How to Disable Save and Save As using VBA

You can use the Workbook_BeforeSave event to achieve this, disabling the CommandBars won't stop your users using a shortcut such as CTRL + S.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

    MsgBox "You can't save this workbook!"
    Cancel = True

End Sub

You can use the Application object to access the toolbar buttons directly:

Private Sub Workbook_Open() 
    Application.CommandBars("Worksheet Menu Bar").Controls("File").Controls("Save As...").Enabled = False 
    Application.CommandBars("Worksheet Menu Bar").Controls("File").Controls("Save").Enabled = False 
End Sub 

Tags:

Excel

Vba