Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 4 of 4

2006 VBA Project References in Excel

This is a discussion on 2006 VBA Project References in Excel within the MapPoint Desktop Discussion forums, part of the Map Forums category; I installed MapPoint 2006, and changed the appropriate library (primarily MapPoint Object Library from 11.0 to 13.0). However, when I ...

  1. #1
    onegalacticwino is offline Junior Member White Belt
    Join Date
    Oct 2004
    Posts
    4

    2006 VBA Project References in Excel

    I installed MapPoint 2006, and changed the appropriate library (primarily MapPoint Object Library from 11.0 to 13.0).

    However, when I run my excel macros, they are no longer functioning correctly. Any ideas? I think it has something to do with the declarations and settings at the begninning of my macro:

    Code:
    Dim objSW As MapPoint.SavedWebPage
    Dim objMap As MapPoint.Map
    Set objMap = GetObject(, "MapPoint.Application").ActiveMap
    objMap.Application.Units = geoMiles
    Dim shpParis As MapPoint.Shape
    Dim objppt As Object
    On Error Resume Next

  2. #2
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    I wonder if you still have MapPoint 2004 installed, maybe it is getting confused between the two? Try uninstalling MapPoint 2004 and re-installing MapPoint 2006 ?

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  3. #3
    WonderMonkey is offline Junior Member Yellow Belt
    Join Date
    Apr 2006
    Posts
    22
    Quote Originally Posted by Eric Frost
    I wonder if you still have MapPoint 2004 installed, maybe it is getting confused between the two? Try uninstalling MapPoint 2004 and re-installing MapPoint 2006 ?

    Eric
    I would say this is a great candidate for the problem. The very nature of "GetObject" allows for this to happen. I found this to be a pretty big deal with multiple installs of Word, etc. back when I did VB6.

  4. #4
    WonderMonkey is offline Junior Member Yellow Belt
    Join Date
    Apr 2006
    Posts
    22
    Something was bugging me about this so I pondered.... afterwards I opened up the help file in 2004 and seen the following.

    CreateObject is even more versatile, however. Using it, you can specify the version of MapPoint that you create by changing the ProgID that you pass into it. The following code creates one instance of MapPoint Europe and one of MapPoint North America (assuming that you have both installed on your computer):

    Dim MPAppNA As MapPoint.Application
    Dim MPAppEur As MapPoint.Application
    Set MPAppNA = CreateObject("MapPoint.Application.NA")
    Set MPAppEur = CreateObject("MapPoint.Application.EU")If you have multiple releases of MapPoint installed on your computer, you can also specify the release that you want to create. The following example creates an instance of MapPoint North America 2004:

    Dim MPApp As MapPoint.Application
    Set MPApp = CreateObject("MapPoint.Application.NA.11")Note MapPoint 2004 is version 11 of MapPoint.
    Basically it shows how to use CreateObject and control which version to get.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel and MapPoint 2006 question
    By farm_cart in forum MapPoint Desktop Discussion
    Replies: 12
    Last Post: 06-06-2006, 11:09 AM
  2. Display OS Grid References not Lat & Long
    By Anonymous in forum Wish List
    Replies: 0
    Last Post: 01-16-2004, 09:18 AM
  3. OS Grid References - FindResults
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 10-14-2002, 04:20 AM
  4. Presently we are working on a project in which we ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 02-25-2002, 02:50 AM
  5. Accuracy With OSGB Grid References
    By Anonymous in forum MP2K Magazine Articles
    Replies: 0
    Last Post: 12-11-2001, 11:48 PM

Tags for this Thread

Posting Permissions

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


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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96