Name property (Waypoint)

Returns the name of the Waypoint object, which is the name of the location or Pushpin that was used to create the waypoint. Read-only String.

Applies to

Objects:  Waypoint

Syntax

object.Name

Parameters

Part Description
object Required. An expression that returns a Waypoint object.

Example

    Sub WaypointName()

  Dim objApp As New MapPoint.Application   Dim objMap As MapPoint.Map   Dim objRoute As MapPoint.Route
  'Set up the application   Set objMap = objApp.ActiveMap   Set objRoute = objMap.ActiveRoute   objApp.Visible = True   objApp.UserControl = True
  'Add a waypoint to the map   objRoute.Waypoints.Add objMap.FindResults("Seattle, WA").Item(1)
  'Get the name of the waypoint you added   MsgBox "Name of waypoint: " + objRoute.Waypoints.Item(1).Name
  End Sub

Note  This sample code is specific for use in MapPoint North America; it is for illustration purposes only.