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:
Dim objApp As New MapPoint.Application
objApp.Visible = True
objApp.UserControl = True
Dim szconn As String
Dim oDS As MapPoint.DataSet
szconn = objApp.Path & "\Samples\Terrs.xls!Sheet1!A1:E127"
Set oDS = .ImportTerritories(szconn, , geoCountryUnitedStates, , geoImportExcelA1)
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.