Quit Event

Applies To

Application object.

Description

Occurs when the user quits Word.

Syntax

Private Sub object_Quit( )

object An object of type Application declared with events in a class module.

See Also

Close event, DocumentChange event, ExitWindows method, New event, Open event, Quit method.

Example

This example ensures that the Standard and Formatting toolbars are visible before the user quits Word. As a result, when Word is started again, the Standard and Formatting toolbars will be visible.

Private Sub myApp_Quit()
    CommandBars("Standard").Visible = True
    CommandBars("Formatting").Visible = True
End Sub