I'm trying to ensure some template spreadsheets do not get overwritten with user data, so I'm trying to Force as SaveAs only. If the user selects Save from the drop down menu, or hits the Save icon on the toolbar, then this sub does the trick.
Code:
Sub FileSave()
MsgBox "Please use SaveAs and give the document a new name.", vbOKOnly + vbInformation, "Saving Template Not Allowed"
End Sub
However, if they hit the big red X in the upper right hand corner, the following message is displayed, and they can select Yes, and overwrite the template. How do I prevent this messagebox from showing up and, if they close the workbook by hitting the red X, it simply exists without saving?