MapPoint Forums

MapForums

Community of MapPoint and Bing Maps Users and Developers




Developing with MapPoint and Excel - Getting Started

This is a discussion on Developing with MapPoint and Excel - Getting Started within the MP2K Magazine Articles forums, part of the Map Forums category; For those interested in leveraging Excel and/or VBA with MapPoint, I have a new reference out titled "Excel Basics to ...


Go Back   MapPoint Forums > Map Forums > MP2K Magazine Articles

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 09-20-2008
Elliot Bendoly's Avatar
www.excel-blackbelt.com
White Belt
 
Join Date: Sep 2008
Location: Atlanta
Posts: 8
Re: Developing with MapPoint and Excel - Getting Started

For those interested in leveraging Excel and/or VBA with MapPoint, I have a new reference out titled "Excel Basics to Blackbelt" (Cambridge Press 2008 ). Lot's of tricks to make use of. I've made a number of applications that integrate MapPoint with other apps through Excel and VBA as well.
Here's a video link to a redux of a Webinar I gave for both Palisades and Cox Communication recently:
The text is currently available at a promotional discount at Amazon.com
Enjoy

Last edited by Eric Frost; 09-20-2008 at 01:49 PM..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12 (permalink)  
Old 10-06-2008
Junior Member
White Belt
 
Join Date: Oct 2008
Posts: 4
Re: Developing with MapPoint and Excel - Getting Started

I hope someone is still viewing this thread. I need some help.
I do not have a lot of knowledge of VB or any programing language.
What I want to do is edit the script on this page MapPoint VBA Tutorial, Vista Gadgets, Web Site Visitors Map, MapPoint GPS API, more to use Latitude and Longitude instead of the address.

Thank you for any help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13 (permalink)  
Old 10-06-2008
Administrator
Green Belt
 
Join Date: Sep 2007
Posts: 106
Re: Developing with MapPoint and Excel - Getting Started

Sure, here is the code:

Code:
 
Dim objMap As MapPoint.Map
Private Sub Begin_Click()
  Dim objFindResults As MapPoint.FindResults
  Dim objLoc As MapPoint.Location
  Dim objPushpin As MapPoint.Pushpin
  
  Set oApp = CreateObject("MapPoint.Application.NA")
  Set objMap = oApp.NewMap
  
  Dim nCurrentRow As Integer
  nCurrentRow = 6
    
  szLatitude = Cells(nCurrentRow, 3)
  Do While (szLatitude <> 0)
    szName = Cells(nCurrentRow, 2)
    If szName = 0 Then
      szName = nCurrentRow - 11
    End If
    
    szLongitude = Cells(nCurrentRow, 4)
    nRadius = Cells(nCurrentRow, 7)
    Set objLoc = objMap.GetLocation(szLatitude, szLongitude)
    Set objPushpin = objMap.AddPushpin(objLoc, szName)
    ' draws circle based on radius in column G
    objMap.Shapes.AddShape geoShapeRadius, objLoc, nRadius, nRadius
    ' pop up pushpin name
    objPushpin.BalloonState = geoDisplayName
    
    nCurrentRow = nCurrentRow + 1
    szLatitude = Cells(nCurrentRow, 3)
    
  Loop
  
  objMap.Saved = True
  oApp.Visible = True
  objMap.DataSets.ZoomTo
  ' change all pushpins to small red circle
  objMap.DataSets(1).Symbol = 25
  objMap.Altitude = objMap.Altitude * 1 'adjust altitude if desired
  
  Exit Sub

The trick is to use the GetLocation method..

Also the spreadsheet with the modified code is attached.

hope this helps!

Eric
Attached Files
File Type: zip radius_circles(latlon).zip (11.9 KB, 21 views)
__________________
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contribute and Learn at our New MapPoint and Virtual Earth Wiki - http://www.MapElves.com
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14 (permalink)  
Old 10-07-2008
Junior Member
White Belt
 
Join Date: Oct 2008
Posts: 4
Re: Developing with MapPoint and Excel - Getting Started

That is awesome, Eric! Thank you very much.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15 (permalink)  
Old 10-07-2008
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 3,505
Blog Entries: 3
Re: Developing with MapPoint and Excel - Getting Started

Glad to be of help! Let us know if it works for you..

By the way, why do you need circles? When I originally wrote the sample code, I did not have any application in mind..

This is also a good suggestion for the MapForums Plus downloads.. I will clean it up and post over there as well.

Eric
__________________
~ Now taking orders for MapPoint 2010 ~
~~
~ Upgrade to MapForums Plus membership ~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16 (permalink)  
Old 10-08-2008
Junior Member
White Belt
 
Join Date: Oct 2008
Posts: 4
Re: Developing with MapPoint and Excel - Getting Started

It worked exactly as hoped.

What I am doing is creating coverage maps that show radius distances from 800 plus points. Doing them individually is quite time consuming.

I am curious why it does not give the actual radius. It takes the number provided, say 50 miles, and it returns a 24.8 mile radius circle on the map. It looks like it is returning the diameter of the circle instead of a radius.

There is an easy enough work around and I set up my spreadsheet to compensate for this I just wanted to understand why.

Another question, if you do not mind - Is there a way to code this to work with a map that is already opened instead of opening a new one every time?

Thank you again for your help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17 (permalink)  
Old 01-26-2010
Junior Member
White Belt
 
Join Date: Jan 2010
Posts: 7
Re: Developing with MapPoint and Excel - Getting Started

Hi,

I have read the installment of how to create a macro that opens MapPoint and plots an address.

Can anyone help me with the following; instead of opening a new map can an existing mappoint map that has been embedded in the the same excel work book be referenced instead?

Any help on this will be greatly appreciated.

Many thanks

Arran
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
developing, excel, mappoint, started


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/developing-mappoint-excel-getting-started-3301.html

Posted By For Type Date
MapPoint VBA Tutorial, Vista Gadgets, Web Site Visitors Map, MapPoint GPS API, more This thread Refback 04-18-2007 03:14 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
addpushpin - need help to get started BWard MapPoint Desktop Discussion 7 12-19-2005 02:15 PM
Getting Started with the Virtual Earth Map Control Eric Frost MP2K Magazine Articles 0 08-02-2005 03:39 PM
Getting Started with VB6 and MapPoint 2004 takk MapPoint Desktop Discussion 3 12-08-2004 02:20 PM
I am developing an application using Mappoint web .... Anonymous MapPoint Desktop Discussion 0 08-02-2002 07:11 AM
I am developing an application using Mappoint web .... Anonymous MapPoint Desktop Discussion 0 12-31-1969 06:48 PM


All times are GMT -5. The time now is 12:34 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
MP2K Magazine
Visitor Map



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67