| so... whats wrong with this code
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 06/10/2003 by Daniel Fountain
'
Dim objApp As MapPoint.Application
Dim objMap As MapPoint.Map
Dim objLoc1 As MapPoint.Location
Dim objLoc2 As MapPoint.Location
Dim objCenter As MapPoint.Location
'//open MapPoint and create a new map
Set objApp = New MapPoint.Application
objApp.Visible = True
objApp.UserControl = True
objApp.Activate
Set objMap = objApp.NewMap
objApp.Units = MapPoint.GeoUnits.geoMiles
objLoc1 = objMap.FindResults("IP1 5HN")(1)
objLoc1.DistanceTo (objMap.FindResults("IP5 3UT")(1))
'
End Sub
The error is on the "objLoc1 = objMap.FindResults("IP1 5HN")(1)" line and it says "object vairiable or with block object vairable not set" |