| ok, done it, this is how
Private Sub mapBtn_Click()
Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objLoc As MapPoint.Location
Set objMap = objApp.ActiveMap
objApp.Visible = False
objApp.UserControl = True
On Error GoTo er
If Len(Postcode_txt) = 0 Then Exit Sub
'Find an address
Set objLoc = objMap.FindAddressResults(, , , , Postcode_txt.Text, geoCountryUnitedKingdom)(1)
CalcPos objMap, objLoc, maplat, maplon
Exit Sub
er:
MsgBox Str(Err) + SP + Err.Description
End Sub
cool ehh!! |