MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




2006 VBA Project References in Excel

This is a discussion on 2006 VBA Project References in Excel within the MapPoint 2006/2009 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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-08-2006
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 05-08-2006
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 3,041
Blog Entries: 2
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
__________________
~ Now taking orders for MapPoint 2009 ~
~~
~ 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
  #3 (permalink)  
Old 05-20-2006
Junior Member
Yellow Belt
 
Join Date: Apr 2006
Posts: 20
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 05-20-2006
Junior Member
Yellow Belt
 
Join Date: Apr 2006
Posts: 20
Something was bugging me about this so I pondered.... afterwards I opened up the help file in 2004 and seen the following.

Quote:
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.
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
2006, excel, project, references, vba


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
Excel and MapPoint 2006 question farm_cart MapPoint 2006/2009 Discussion 12 06-06-2006 10:09 AM
Display OS Grid References not Lat & Long Anonymous Wish List 0 01-16-2004 08:18 AM
OS Grid References - FindResults Anonymous MapPoint 2006/2009 Discussion 3 10-14-2002 03:20 AM
Presently we are working on a project in which we .... Anonymous MapPoint 2006/2009 Discussion 1 02-25-2002 01:50 AM
Accuracy With OSGB Grid References Anonymous MP2K Magazine Articles 0 12-11-2001 10:48 PM


All times are GMT -5. The time now is 03:10 AM.


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

Tenerife Holiday
Find a great deal on a Tenerife holiday through UlookUbook! Check out the options online...



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