VBA code to search address on Google Maps (1 Viewer)

nhtuan

New member
Local time
Today, 09:13
Joined
Dec 23, 2010
Messages
24
Application.FollowHyperlink does not work!

Code:
Private Sub Command5_Click()
Dim strDetailAddress As String
Dim strGmaps As String
On Error GoTo MyError
        strDetailAddress = Me.CAddresse & " " & Me.Ccity & " " & Me.CodePostal
        strGmaps = "http://maps.google.com/maps?h1=en&q=" & strDetailAddress
        CreateObject("Shell.Application").Open CVar(strGmaps)
Exit_MyError:
        Exit Sub
       
MyError:
        MsgBox Err & ": " & Err.Description
        Resume Exit_MyError
End Sub
 

Gasman

Enthusiastic Amateur
Local time
Today, 17:13
Joined
Sep 21, 2011
Messages
14,307
Application.FollowHyperlink works for me?
is Caddresse meant to be that and not CAddress ?

If so, you should have consistency in your naming. :(
 

Users who are viewing this thread

Top Bottom