I'm developing an application with Mappoint 2002 and Visual Basic 6, and I have a problem with the unqualified code.

I have a form with a map, in order to be able of searching for places, and use them in other parts of the application. Well, it goes right the first time it's executed, but the second tiem, I obtaint the 462 error.

The program stops at:


where radio is a Mappoint.Shape object.

In Form_Load I have:

mapaPP.NewMap (geoMapEurope)
Set oMpApp = GetObject(, "MapPoint.Application")
Set oMap = mapaPP.ActiveMap
oMap.Application.Units = geoKm
Set radio=Nothing

And, in Form_Unload:

mapaPP.ActiveMap.Saved = True

mapaPP is the Mappoint Control

But the problem continues.

Do you know how I could solve it?