BeforeSave Event

See Also         Example         Applies To

Occurs before the workbook is saved.

Syntax

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

SaveAsUi   True if the Save As dialog box will be displayed.

Cancel   False when the event occurs. If the event procedure sets this argument to True, the workbook isn't saved when the procedure is finished.