FindPushpin method
Finds a Pushpin of a specified name. Returns the Pushpin object. Returns "Nothing
" if the find results are ambiguous, or if there is no match.
Applies to
Objects: Map
Syntax
object.FindPushpin(Name)
Parameters
Part | Description |
---|---|
object | Required. An expression that returns a Map object. |
Name | Required String. The name of the Pushpin to find. |
Remarks
To access data associated with a Pushpin, use the MoveToPushpin method on a Recordset object.
To open the Find dialog box for user input, use the ShowFindDialog method on the Map object.
Example
Sub ChangeFoundPushpinSymbol()
Dim objApp As New MapPoint.Application
Dim objPin As MapPoint.Pushpin
'Set up the application
objApp.Visible = True
objApp.UserControl = True
objApp.OpenMap objApp.Path + "\Samples\Clients.ptm"
'Find a Pushpin, then select it and change its symbol
Set objPin = objApp.ActiveMap.FindPushpin("Westin Hotel")
objPin.Select
objPin.Symbol = 171
End Sub
Note This sample code is specific for use in MapPoint North America; it is for illustration purposes only.