Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Need a code which can search specific hotel adress in google

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.


Regards
Sunil.V
9632347629





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

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.


#If Win64 Then
Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal Operation As String, _
ByVal Filename As String, Optional ByVal Parameters As String, _
Optional ByVal Directory As String, _
Optional ByVal WindowStyle As Long) As Long
#ElseIf Win32 Then
Private Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal Operation As String, _
ByVal Filename As String, Optional ByVal Parameters As String, _
Optional ByVal Directory As String, _
Optional ByVal WindowStyle As Long) As Long
#End If

Sub runGoogleSearch()
ShellExecute 0, "open", "https://www.google.com/search?q=" & _
Replace(ActiveCell.Value, " ", "+")
End Sub

Edit to suit.

--
Sanity is such a burden.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Need a code which can search specific hotel adress in google

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.


#If Win64 Then
Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal Operation As String, _
ByVal Filename As String, Optional ByVal Parameters As String, _
Optional ByVal Directory As String, _
Optional ByVal WindowStyle As Long) As Long
#ElseIf Win32 Then
Private Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal Operation As String, _
ByVal Filename As String, Optional ByVal Parameters As String, _
Optional ByVal Directory As String, _
Optional ByVal WindowStyle As Long) As Long
#End If

Sub runGoogleSearch()
ShellExecute 0, "open", "https://www.google.com/search?q=" & _
Replace(ActiveCell.Value, " ", "+")
End Sub

Edit to suit.

--
Sanity is such a burden.


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
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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.
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Need a code which can search specific hotel adress in google

I understand and again thanks for your support
Let me if need any assistance ba bye🙋🙋
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
O.T. Google Search RagDyeR Excel Discussion (Misc queries) 4 May 12th 09 11:26 PM
VBA to get Google to search Lucas Budlong Excel Programming 3 February 19th 06 09:57 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Ed[_18_] Excel Programming 4 May 20th 04 02:08 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Frank Kabel Excel Programming 0 May 19th 04 08:11 PM
Google Search 6.0 Ron de Bruin Excel Programming 11 January 2nd 04 09:57 PM


All times are GMT +1. The time now is 12:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"