kerrypnx
11/2/2018 - 8:54 AM

search function

revise 11-2

Sub soushou()
Dim wrd As Range
Dim searT, URL As String
searT = ""
For Each wrd In Selection.Range.Words
    searT = searT + "+" + Trim(wrd.Text)
Next
 searT = Right(searT, Len(searT) - 1)
URL = "https://www.google.com.hk/search?q=" + searT

Shell ("C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe -url " + URL)

End Sub