Share via


NewDataSet event

Occurs after a new data set is created.

Applies to

Objects:  Map, MappointControl

Syntax

object.NewDataSet(NewDataSet)

Parameters

Part Description
object An expression that evaluates to a Map or MappointControl object.
NewDataSet DataSet object. Data set just created.

Remarks

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

Example

    Dim WithEvents objApp As MapPoint.Application
  Dim WithEvents objMap As MapPoint.Map

  Private Sub Command1_Click()     objMap.DataSets.AddPushpinSet "New Pushpin Set"   End Sub
  Private Sub Form_Load()     'Set up the application     Set objApp = CreateObject("mappoint.application")     Set objMap = objApp.ActiveMap     objApp.Visible = True     objApp.UserControl = True   End Sub
  Private Sub objMap_NewDataSet(ByVal NewDataSet As MapPoint.DataSet)     MsgBox "NewDataSet event fired."   End Sub