Got any Excel/VBA Questions? Free Excel Help
Preventing a Workbook From Being Saved as Another Name.
The code below can be used to stop any users saving a Workbook as another name and another location. The code must be placed in the Private Module of the Workbook Object (ThisWorkbook). The fastest way to get there is to right click on the Excel icon, top left next to File and select View Code. It is in here you should place the code below and then save the Workbook. So long as the Workbook is opened with macros enabled the code will fire anytime any user tries to use Save As.
Private Sub Workbook_BeforeSave _ (ByVal SaveAsUI As Boolean, Cancel As Boolean) If SaveAsUI = True Then Cancel = True End Sub
|Prevent Excel Being Saved With Another Name|
|Prevent Save Prompts in Excel|