View Single Post

  #1 (permalink)  
Old 02-17-2003
misterb83 misterb83 is offline
Junior Member
White Belt
 
Join Date: Feb 2003
Posts: 10
importing excel file into mappoint

I would like to import datas from excel into mappoint. I wrote this programm but there's an error 424. Can you help me????


Private Sub Form_Load()

load_mappoint
OpenDataSet

End Sub

Private Sub load_mappoint()

Dim MPApp As MapPoint.Application
Set MPApp = New MapPoint.Application
MPApp.Visible = True
MPApp.UserControl = True

End Sub

Private Sub OpenDataSet()

Dim objDataSets As MapPoint.DataSets
Dim objDataSet As MapPoint.DataSet
Dim zDataSource As String

zDataSource = "C:\Classeur1.xls!Sheet1!A1:B2"
Set objDataSets = objApp.ActiveMap.DataSets 'error 424, here!!!
Set objDataSet = objDataSets.ImportData(zDataSource)

End Sub
Reply With Quote