Quit event
Occurs when MapPoint is closing. The Quit event cannot be cancelled.
Applies to
Objects: Application
Syntax
object.Quit
Part |
Description |
---|---|
object |
An expression that evaluates to an Application object. |
Remarks
Do not make this event infinitely recursive by calling itself or causing itself to be called.
Do not call a method or change any property during this event.
Example
Dim WithEvents objApp As MapPoint.Application
Private Sub Form_Load()
'Set up the application
Set objApp = CreateObject("mappoint.application")
objApp.Visible = True
objApp.UserControl = True
End Sub
Private Sub Command1_Click()
'Close the application when button is clicked
objApp.Quit
End Sub
Private Sub objApp_Quit()
MsgBox "Quit event fired."
End Sub