+ Reply to Thread
Results 1 to 5 of 5

VBA interface with MapPoint (datatypes)

  1. #1
    Forum Contributor
    Join Date
    06-16-2011
    Location
    London
    MS-Off Ver
    Excel XP
    Posts
    276

    VBA interface with MapPoint (datatypes)

    What I'm trying to do is have Excel interface with MapPoint (v17 - 2010) in order to automatically work out drive times between two grid references. However, while the code below works perfectly if I have 2 postcodes, if I try it with grid refs instead it gives me the error: "The requested member of the collection does not exist. Use a valid name or index number".

    Please Login or Register  to view this content.


    The problem is I only have one postcode, the second data source is worked out from looking up the northing and easting (grid ref) of a number of postcodes from a database I have (yep, of 1.7 million postcodes and their grid refs) and taking the average.....but I have no way to convert back the other way.

    So.....I either need someone to tell me how I can get the above code working with grid refs instead of postcodes or a way to get the nearest postcode from a grid ref. Any ideas?

  2. #2
    Forum Contributor
    Join Date
    06-16-2011
    Location
    London
    MS-Off Ver
    Excel XP
    Posts
    276

    Re: VBA interface with MapPoint (datatypes)

    Came up with a plan to reverse look up grid refs against the nearest valid postcode......but I'll leave the thread up in case anyone does know anything about interfacing with MapPoint cos any info would be handy.

  3. #3
    Registered User
    Join Date
    01-25-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: VBA interface with MapPoint (datatypes)

    What version of MapPoint do you have? They did add the ability to look up OS Grid Reference, but I forget in which version they first added it. Maybe MapPoint 2006 or 2009.

    Here's an example of how to use it.

    Please Login or Register  to view this content.
    Do you need help with modifying your code to make use of this?

    Eric
    Last edited by Eric Frost; 01-25-2013 at 11:22 AM.
    Map Forums - http://www.MapForums.com

  4. #4
    Forum Contributor
    Join Date
    06-16-2011
    Location
    London
    MS-Off Ver
    Excel XP
    Posts
    276

    Re: VBA interface with MapPoint (datatypes)

    Hugely helpful, thanks Eric.

  5. #5
    Registered User
    Join Date
    01-25-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: VBA interface with MapPoint (datatypes)

    Great! Glad to be of help. We have published a lot more Excel & MapPoint example code http://www.mp2kmag.com/update

    Eric

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1