Hi folks,
the code below generates a runtime error R6025 after looping 2004 times, under mp2002 with VB6 SP5. This is stripped down from a more complex app which sees same behaviour. Anyone seen this before? Suggestions?
thanks,
Larry
Private Sub Command1_Click()
Dim dblLoop As Double
Dim dblLat As Double
Dim objPushPin As MapPointctl.Pushpin
Dim objLoc As MapPointctl.Location
Dim objMap As MapPointctl.Map
Dim bKeepGoing As Boolean
Set objMap = Me.MappointControl1.ActiveMap
bKeepGoing = True
dblLat = 52
dblLoop = 1
While bKeepGoing
Set objLoc = objMap.GetLocation(dblLat, -114)
Set objPushPin = objMap.AddPushpin(objLoc, "IT:" & CStr(dblLoop))
objPushPin.BalloonState = geoDisplayNone
objPushPin.Symbol = 66
objPushPin.Highlight = False
objPushPin.Note = "IT:" & CStr(dblLoop)
Debug.Print dblLoop
Set objPushPin = Me.MappointControl1.ActiveMap.FindPushpin("IT:" & CStr(dblLoop))
If Not (objPushPin Is Nothing) Then
objPushPin.Select
objPushPin.Delete
End If
DoEvents
dblLat = dblLat - 0.001
dblLoop = dblLoop + 1
Wend
Debug.Print "done"
End Sub
Private Sub Form_Load()
Me.MappointControl1.NewMap geoMapNorthAmerica
End Sub
[/code]