Private Sub object_Quit( )
object A variable which references an object of type Application declared with events in a class module.
Remarks
For information about using events with the Application object, see Using Events with the Application Object.
Example
This example ensures that the Standard and Formatting toolbars are visible before the user quits Publisher. As a result, when Publisher is started again, the Standard and Formatting toolbars will be visible.
This code must be placed in a class module, and an instance of the class must be correctly initialized in order to see this example work; see Using Events with the Application Object for directions on how to accomplish this.
Public WithEvents appPublisher as Publisher.Application
Private Sub appPublisher_Quit()
CommandBars("Standard").Visible = True
CommandBars("Formatting").Visible = True
End Sub