Hello,
I've made a VB6 program which include the CalcPos sub made by Gilles Kohl. It was running well until I made some changes but I can't success to go back ;-(
I've created a VB6 application which opens a new map.
I've inserted a simple button with the following code :
Dim objMAP As MapPointCtl.Map
Dim objPP As MapPointCtl.Location
Dim X As Double
Dim Y As Double
Set objMAP = Me.ctrlMAPPOINT.ActiveMap
Set objPP = objMAP.FindPushpin("21000, DIJON")
Call CalcPos(objMAP, objPP, X, Y)
MsgBox "X = " & X & vbCrLf & "Y = " & Y, , "IT WORKS !"
I obtain a stupid error, Invalid pointer. I've tried with the
Dim objMAP As MapPoint.Map
Dim objPP As MapPoint.Location
instructions but the problem is the same...
objPP returns every time a nothing reference !
The code is made for France, but it should works with any place.
"21000, DIJON" works fine into MapPoint
Regards,
Vincent BENNER