Hi
I am trying to get the lat lon from a given postcode using the following routine in VB6
Private Sub mapBtn_Click()
Dim oMap As MapPoint.Map
Dim oLoc As MapPoint.Location
On Error GoTo er
If Len(Postcode_txt) = 0 Then Exit Sub
Set oMap = New MapPoint.Map '.ActiveMap
Set oLoc = oMap.FindAddressResults("", "", "", "", Postcode_txt, geoCountryUnitedKingdom)
CalcPos oMap, oLoc, maplat, maplon
Exit Sub
er:
MsgBox Str(Err) + SP + Err.Description
End Sub
My problem is the line
Set oLoc = oMap.FindAddressResults("", "", "", "", Postcode_txt, geoCountryUnitedKingdom)
generates error 13, type mismatch
Any ideas folks
Thanks in advance
