Community of VE/MapPoint Users and Developers
This is a discussion on Finding Pushpin Name by clicking on the Pushpin?(MP 2002) within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I am a relatively beginner programmer and would certainly appreciate your help with my problem. I am adding with ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Finding Pushpin Name by clicking on the Pushpin?(MP 2002) I am a relatively beginner programmer and would certainly appreciate your help with my problem. I am adding with the help of a Recordset from an Access database to Mapoint and adding pushpins with names as IDs that I get from the Recordset from Access. So far so good. What I want to know is can I select the ID or the pushpin name of each individually clicked pushpin? I am doing this in VB6 Thanks. Nick. |
| ||||
|
Nick, You could put this in a command button. Code: Dim objmap As MapPointctl.Map
Dim objPushpin As MapPointCtl.Pushpin
Set objmap = MapPointControl1.ActiveMap
'Make sure the item selected on the map is a pushpin
If TypeOf objmap.Selection Is Pushpin Then
Set objPushpin = MapPointControl1.Selection
'Do Something
msgbox objpushpin.name
End If
__________________ John http://www.support-pc.com Order MapPoint 2006 Here https://secure.mp2kmag.com/?refer=support-PC |
| |||
|
If this is going to be used by other people, you also want to trap the case where there is no selection. If you don't do that, the program will error when you try to ask the typeof nothing. Try this: Code: Dim objmap As MapPointctl.Map
Dim objPushpin As MapPointCtl.Pushpin
Set objmap = MapPointControl1.ActiveMap
'Make sure the item selected on the map is a pushpin
If Not objmap.Selection is nothing Then
If TypeOf objmap.Selection Is Pushpin Then
Set objPushpin = MapPointControl1.Selection
'Do Something
msgbox objpushpin.name
End If
End If
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Get PushPin | Anonymous | MapPoint 2006/2009 Discussion | 1 | 03-03-2005 10:16 AM |
| automate clicking action | zauber | MapPoint 2006/2009 Discussion | 0 | 07-10-2004 04:23 AM |
| Discuss news by clicking New Topic | Eric Frost | MapPoint 2006/2009 Discussion | 1 | 06-15-2003 08:29 PM |
| finding a pushpin from a .dll | blackmap | MapPoint 2006/2009 Discussion | 1 | 01-10-2003 02:11 PM |
| pushpin | Anonymous | MapPoint 2006/2009 Discussion | 1 | 08-30-2002 08:41 AM |
French Ski Holidays
French ski holidays will suit all skiers and most taste buds too. There is a huge range of accommodation from self-catered or catered chalets to all-inclusive luxury hotels.
Best Travel Agent
Travel Counsellors was recently voted the UK's Best Travel Agent at the Guardian Unlimited travel awards. Book your travel with an award winning travel agent.
Thailand Holidays
Thailand Holidays can suit your budget when you book with dealchecker.co.uk. If you are strapped for cash, visit online to find the deal for you.
Jamaica Holidays
Jamaica holidays give you the chance to enjoy the vibrant cultural heritage and wonderful laid back atmosphere of the Caribbean. Book here!
Cheap Canaries Holidays
Are you hunting down cheap Canaries holidays? Well check out ulookubook.com to bag a great value holiday. There are numerous festivals taking place all year round. Why not book your holiday around one?
Inclusive package holidays
Choose one of the many inclusive package holidays at Travel.co.uk and save a lot of trouble and money too!
Cheap Holidays in Goa
Visit the unique blend of east and west in India! Get information on cheap holidays in Goa, only at On The Beach.