The code below captures the latitudes and longitues correctly, however, it
breaks when i try to "goto" the latitude and longitude. It seems to be a
syntax error.
These are the line where i need help with. I want to go the calculated Lat
and Lon. Again, they are alredy calcultated, i just want to go to them.
Thanks for any help given.
Set objLocCalc = MappointControl1.ActiveMap.Location(lat, lon)
'.SelectedArea(lat, lon)
objLocCalc.GoTo
Private Sub MappointControl1_BeforeClick(ByVal Button As Long, ByVal Shift
As Long, ByVal X As Long, ByVal Y As Long, Cancel As Boolean)
Dim objMap As MapPointCtl.Map
Dim objLoc As MapPointCtl.Location
Dim objLocCalc As MapPointCtl.Location
'Dim Lat As Double
'Dim Lon As Double
Set objMap = MappointControl1.ActiveMap
Set objLoc = MappointControl1.ActiveMap.XYToLocation(X, Y)
CalcPos objMap, objLoc, lat, lon
Print lat
Print lon
Set objLocCalc = MappointControl1.ActiveMap.Location(lat, lon)
'.SelectedArea(lat, lon)
objLocCalc.GoTo
'objMap.SelectedArea.Location.GoTo
End Sub