Fazendo Buscas no Google - Excel VBA shell command to search Chrome


Este código serve para efetuarmos uma pesquisa no Google a partir do código VBA. Muitas pesquisas e ampliações podem ser executadas a partir daqui no que diz respeito a aplicabilidade.


Function GoogleSearch (nFrase As String)    

Dim ChromePath As String    
Dim search_string As String
    
Let search_string = "Amazon André Luiz Bernardes"    
Let search_string = Replace(search_string, " ", "+")
' Let ChromePath = "C:\Program Files\Google\Chrome\Application\chrome.exe"    
' Uncomment the following line and comment out previous for Windows 64 versions        

Let ChromePath = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"

Shell ChromePath & " -url http://google.com/#q=" & search_string, vbMinimizedNoFocus    
', vbMinimizedNoFocus ' Should be defined in the global namespaceEnd

Function
⬛◼◾▪ Social Media ▪◾◼⬛
• FACEBOOK • TWITTER • INSTAGRAM • TUMBLR • GOOGLE+ • LINKEDIN • PINTEREST

⬛◼◾▪ Blogs ▪◾◼⬛ 

⬛◼◾▪ CONTATO ▪