Item property (FindResults)

Returns a Location or Pushpin object based on its position within the specified FindResults collection. Read-only.

Applies to

Collections:  FindResults

Syntax

object.Item(Index)

Parameters

Part Description
object Required. An expression that returns a FindResults collection.
Index Required Variant. An integer representing the index number of the location or Pushpin in the collection. Order depends on the method that returned the collection:

FindNearby method (on a Directions collection or Direction or Location object) lists returns in distance order, closest to farthest.

FindResults, FindAddressResults, and FindPlaceResults methods (on the Map object) list returns in best-possible match order.

Remarks

The Item property is the default property for the FindResults collection.

Example

    Sub AddPushpinAtFoundPlace()

  Dim objApp As New MapPoint.Application   Dim objFR As MapPoint.FindResults
  'Set up the application   objApp.Visible = True   objApp.UserControl = True
  'Get the results for a search,   ' then add a Pushpin at the first result location   Set objFR = objApp.ActiveMap.FindResults("Seattle, WA")   objApp.ActiveMap.AddPushpin objFR.Item(1)
  End Sub

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