custom function
I'm still working on it (making it use directions next)
at the moment it just opens to maps
Code:
Function googleMapsAddress(conAddress As Variant, conSuburb As Variant, conState As Variant)
'OPEN ADDRESS IN IE OR CHROME
'makes strings to be used below
Dim strWebLink As String, strURL As String, strAddress As String, strSuburb As String, strState As String
strWebLink = "http://maps.google.com/maps?q="
'trims the code
strAddress = conAddress
strAddress = Trim(strAddress)
'removes double space
strAddress = Replace(strAddress, " ", " ")
'replaces spaces to +
strAddress = Replace(strAddress, " ", "+")
'repeat for suburb
strSuburb = conSuburb
strSuburb = Trim(strSuburb)
strSuburb = Replace(strSuburb, " ", " ")
strSuburb = Replace(strSuburb, " ", "+")
'repeat for state
strState = conState
strState = Trim(strState)
strState = Replace(strState, " ", " ")
strState = Replace(strState, " ", "+")
'join strings into one url
strURL = strWebLink & "+" & strAddress & "+" & strSuburb & "+" & strState
'open browser with link
Application.FollowHyperlink strURL
End Function