View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sunil V Sunil V is offline
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