Share via


Open event

Occurs when a map is opened.

Applies to

Objects:  Application

Syntax

object.Open

Part Description
object An expression that evaluates to an Application object.

Remarks

To get the map that was just opened, use the ActiveMap property of the Application object.

Do not make this event infinitely recursive by calling itself or causing itself to be called.

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()     'Open the sample map when button is clicked     objApp.OpenMap objApp.Path + "\Samples\Clients.ptm"   End Sub
  Private Sub objApp_Open()     MsgBox "Open event fired."   End Sub