View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Auric__ Auric__ is offline
external usenet poster
 
Posts: 538
Default Need a code which can search specific hotel adress in google

Sunil V wrote:

On Thursday, February 22, 2018 at 7:42:13 PM UTC+5:30, Auric__ wrote:
crazy vedios on wrote:

I have a list of hotel name for which, I need full address and zip
code.

please provide me the VBA Code rather than searching one by one and
coping searched details to my workbook let do this with the help of
code.

[snip]
Edit to suit.


Thanks for your support

for example my hotel name is "The Leela Hotel Goa" could you give me the
code to search and get address from google.com


Assuming your list isn't insanely long, just use the search I provided.
Here's what I use for searching Google Maps:

Sub launchMaps()
Dim addr As String
addr = "https://www.google.com/maps/place/" & _
Replace(ActiveCell.Value, " ", "+")
#If Mac Then
MacScript "tell application ""Safari""" + vbCrLf + _
"open location """ + addr + """" + vbCrLf + "end tell"
#Else
ShellExecute 0, "Open", addr, , , vbMaximizedFocus
#End If
End Sub

If your list is so long that doing it this way won't work, you can try Place
Details under the Places API:

https://developers.google.com/places...ervice/details

....but the free version is limited to 1000 searches per day, and honestly,
I'm not going to spend my time writing that code for you.

--
A reader lives a thousand lives before he dies.
The man who never reads lives only one.