Workbook.AfterSave event (Excel)

Occurs after the workbook is saved.

Syntax

expression.AfterSave (Success)

expression A variable that represents a Workbook object.

Parameters

Name Required/Optional Data type Description
Success Required Boolean True if the save operation was successful; False otherwise.

Return value

Nothing

Example

The following code example displays a message box if the workbook was successfully saved.

Private Sub Workbook_AfterSave(ByVal Success As Boolean) 
If Success Then 
 MsgBox ("The workbook was successfully saved.") 
End If 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.