Share via


Name property (Location)

Returns the name of the Location object. Read-only String.

Applies to

Objects: Location

Syntax

object.Name

Parameters

Part

Description

object

Required. An expression that returns a Location object.

Example

  Sub LocationName()

  Dim objApp As New MapPoint.Application
  Dim objMap As MapPoint.Map
  Dim objLoc As MapPoint.Location

  'Set up the application
  Set objMap = objApp.ActiveMap
  objApp.Visible = True
  objApp.UserControl = True

  'Find an address
  Set objLoc = objMap.FindAddressResults("1 Microsoft Way", "Redmond", "WA")(1)

  'The name of the Location object is the found address
  MsgBox "Found location: " + objLoc.Name

  End Sub

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