Mappoint 2010 link Excel file trouble

Vron5

New Member
Joined
Apr 27, 2014
Messages
1
Hello, I am trying to import a workbook from excel into Mappoint using VBA. The workbook has multiple sheets and I want the data in each sheet to be a mapped and have a different color pushpin.


I am having trouble mapping any data in Mappoint. I tried to start with this simple code:

Dim sAPP As MapPoint.Application​

Private Sub Workbook_Open()​
Set sAPP = CreateObject("MapPoint.Application.NA.17")​
sAPP.Visible = True​

End Sub​
Sub OpenDataSet()​
Dim objDataSets As MapPoint.DataSets​
Dim objDataSet As MapPoint.DataSet​
Dim zDataSource As String​

zDataSource = "C:\Users\Desktop\MappingTool 4.27.xlsm!PastDue!"​
Set objDataSets = sAPP.ActiveMap.DataSets​
Set objDataSet = objDataSets.ImportData(zDataSource)​
End Sub​

The first part open Mappoint but the second Sub gives me: Error '4030' Method 'ImportData' of object 'DataSets
I have looked at the MP2K Mag code but have not been able to figure it out.

I would greatly appreciate any help! Thank you so much
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,215,335
Messages
6,124,327
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top