Syntax
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Enter
Code
End Sub
This event will run before a workbook saves.
Required Parameters
SaveAsUI
The SaveAsUI parameter will determine if the
Save As Dialog will display. To display
the Save As Dialog set the SaveAsUI value to True. If you don’t want the Save
As Dialog to display set the SaveAsUI value to False.
Cancel
The cancel parameter is original set to False
when the event begins. If the cancel parameter is set to value of True then the
workbook will not save.