View Full Version : finding a pushpin from a .dll

01-08-2003, 10:06 AM
Hi Folks,

created a com-Add-In for Mappoint. When I try to find a pushpin with the following code, I get no result:

Set oApp = CreateObject("Mappoint.Application")
Set oMap = oApp.ActiveMap

Set oPushA = oMap.FindPushpin("xyz")

I am sure there's a pushpin with the name xyz. How can I check if there's a result?

John Meyer
01-10-2003, 02:11 PM
For a COM Add-In you need to "Get" the Map Object that is already running as opposed to Creating a new Map Object.

Dim objmap As MapPoint.Map

Set objmap = GetObject(, "MapPoint.Application").ActiveMap
Dim aPushpin As MapPoint.Pushpin