MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




VBA help needed using MapPoint.Application object

This is a discussion on VBA help needed using MapPoint.Application object within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I'm trying to use some code in an Excel macro, taken from the MSDN site, using the ImportTerritories method. The ...


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

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



Click here to register

Reply

 

LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 10-21-2004
Junior Member
White Belt
 
Join Date: Oct 2004
Posts: 7
VBA help needed using MapPoint.Application object

I'm trying to use some code in an Excel macro, taken from the MSDN site, using the ImportTerritories method. The code is as follows:

Sub CreateTerritoriesMap()

Dim objApp As New MapPoint.Application
objApp.Visible = True
objApp.UserControl = True
Dim szconn As String
Dim oDS As MapPoint.DataSet

With objApp.ActiveMap.DataSets
'Excel sheet
szconn = objApp.Path & "\Samples\Terrs.xls!Sheet1!A1:E127"
Set oDS = .ImportTerritories(szconn, , geoCountryUnitedStates, , geoImportExcelA1)
End With

End Sub

However, the code fails on the first Dim statement as 'User-defined type not defined'. I've referenced the following:

Microsoft MapPoint 11.0 Object Library (Europe)
Microsoft MapPoint Control 11.0

However, looking in the Object Browser only shows a Map and a MapPointUtilities class, i.e. no MapPoint class.

Where can I get the MapPoint class from? Or, is there another way I could automatically export data from excel and produce a Territory map in MapPoint?

I am using MapPoint 2004 and VB 6.0 through Excel.
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 11-03-2004
Junior Member
White Belt
 
Join Date: Oct 2004
Posts: 7
Figured it out...

...after re-reading (and re-reading) the MSDN documentation I have a working macro to import territories into MapPoint.

If anybody else needs help with this, then feel free to PM me.
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
mappointapplication, needed, object, vba


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/vba-help-needed-using-mappoint-application-object-3367.html

Posted By For Type Date
MetaGer, Suche nach: MapPoint.Application This thread Refback 05-21-2008 05:12 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
Job Offer: Mappoint / Dot Net Developer Needed ASAP sbrewer MapPoint 2006/2009 Discussion 0 02-20-2006 09:10 PM
c# ImportData method help needed fletch MapPoint 2006/2009 Discussion 8 03-09-2005 10:15 AM
Less Address Accuracy Needed(!) NickS MapPoint 2006/2009 Discussion 2 11-28-2003 04:39 AM
route object to drawing object Anonymous MapPoint 2006/2009 Discussion 1 05-09-2003 11:29 PM
Help Needed...Received the following Error Reported bkwhite MapPoint 2006/2009 Discussion 2 11-19-2002 06:31 AM


All times are GMT -5. The time now is 07:14 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
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