Share via


Quit Event

Occurs when Microsoft Outlook begins to close. This event is not available in Microsoft Visual Basic Scripting Edition (VBScript).

Subobject**_Quit()**

*object   * An expression that evaluates to an Application object.

Example

This Microsoft Visual Basic/Visual Basic for Applications (VBA) example displays a farewell message when Microsoft Outlook exits. The sample code must be placed in a class module.

Private Sub Application_Quit()
    MsgBox "Goodbye, " & Application.GetNamespace("MAPI").CurrentUser
End Sub

Applies to | Application Object