I need to use information from excel cell to search on a specific website, but the code I have is working in part.
The code opens the website I need for the search; however, it also opens a new tab in chrome using the cell information that I need to do the research on.
Please see the result I am getting in the pic attached. In this case, the information I needed to research is: Medical Aid For Palestinians
Is there anything that can be changed or added to the code to make it work correctly?
I need only 1 chrome website to open of the specific website to be open, and the information for search need to appear inside the box in front of Entity Name.
PS: The website I need for search can also be open in IE.
- Sub SSR_AlertLevel2()
- Dim chromePath As String
- Dim temp As Variant
- Dim searchname1 As String
- Dim temp2 As Variant
- Dim temp3 As Variant
- chromePath = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
- If Range("H2").Value <> "" Then
- 'split the sign '&'
- searchname1 = Range("H2").Value 'Bene1 Name
- temp2 = Split(searchname1, " "): searchname1 = Join(temp2, "+") 'Client name) 'Bene1 Name
- temp3 = Split(searchname1, "&"): searchname1 = Join(temp3, "%26") 'Client name 'Bene1 Name
- Shell (chromePath & " -url http://wubsreporting.chgfe.biz/Reports/Pages/Report.aspx?ItemPath=%2fCompliance+Operations%2fEntity+Name+Search+(Tabular)+Recommended" & searchname1)
- End If