View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Living the Dream Living the Dream is offline
external usenet poster
 
Posts: 151
Default Can UDF return a customized hyperlink?

Hi

From my brief look at your problem you face the following with direct
Geo-Coding, here's a coupe of locations where you can read up on the
Whats What.

https://developers.google.com/maps/d...on/staticmaps/

https://developers.google.com/maps/d...verseGeocoding

You, and or your users of this will require a Google Account, at which
time can set up the required uses of Google's ( Maps API v3 & or Google
Maps Coordinate API ) of which both have daily limitation ( 25,000 &
1,000 respectively ), anything beyond this means you have to start
paying for it.

You will also have to Create an oAuth 2.0 Client ID for API Access.

Anyways good luck with your venture, I put together this little chunk of
code, but without setting up the required API Client & Access, it gives
an Error 404.

HTH
Mick.

Sub Goto_myMap()

Dim IE As Object
Dim myLon As Range, myLat As Range
Dim myMapRef As String

Set IE = CreateObject("InternetExplorer.Application")
Set myLat = [A2]
Set myLon = [B2]

myMapRef = myLat & "," & myLon

If Not myMapRef = "" Then
IE.Visible = True
IE.navigate "http://maps.googleapis.com/maps/api/staticmap?Center="
& myMapRef & "&sensor=false"
End If

Set IE = Nothing
Set objElement = Nothing
Set objCollection = Nothing

Application.StatusBar = ""

End Sub