I have used the tutorial posted in the newsletter to write some code which allows me to plot an address from a spreadsheet onto MapPoint by way of a pushpin by using a command button through VBA. I am new to VBA so do not understand the coding (yet!) and what I would like to do is to expand the number of address to show on the map. the code is as follows:
Dim oApp As MapPoint.Application
Private Sub CommandButton1_Click()
Set oApp = CreateObject("MapPoint.Application.NA.11")
oApp.Visible = True
Set objMap = oApp.NewMap
Set objLoc = _
objMap.FindAddressResults( _
Worksheets("Sheet1").Cells(7, 2), _
Worksheets("Sheet1").Cells(7, 3), , _
Worksheets("Sheet1").Cells(7, 4), _
Worksheets("Sheet1").Cells(7, 5))(1)
objMap.AddPushpin objLoc, _
Worksheets("Sheet1").Cells(2, 1)
'objMap.DataSets.ZoomTo
End Sub
I would like to add a few more lines of address. For instance, 233 South Wacker Drive, Chicago, IL, 60606.
Can someone please advise as to the changes needed topt the code above.
Thanks very much.
Dingo.
Have a good weekend all.