I'm trying to open a Chrome browser from VBA. I understand Chrome does not support ActiveX settings so I'm curious if theres any work-arounds?
Dim ie As Object Set ie = CreateObject("ChromeTab.ChromeFrame") ie.Navigate "google.ca" ie.Visible = True
shell("C:\Users\USERNAME\AppData\Local\Google\Chrome\Application\Chrome.exe -url http:google.ca")
Worked here too:
Sub test544() Dim chromePath As String chromePath = """C:\Program Files\Google\Chrome\Application\chrome.exe""" Shell (chromePath & " -url http:google.ca") End Sub
You can use the following vba code and input them into standard module in excel. A list of websites can be entered and should be entered like this on cell A1 in Excel - www.stackoverflow.com
ActiveSheet.Cells(1,2).Value merely takes the number of website links that you have on cell B1 in Excel and will loop the code again and again based on number of website links you have placed on the sheet. Therefore Chrome will open up a new tab for each website link.
I hope this helps with the dynamic website you have got.
Sub multiplechrome() Dim WebUrl As String Dim i As Integer For i = 1 To ActiveSheet.Cells(1, 2).Value WebUrl = "http://" & Cells(i, 1).Value & """" Shell ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe -url " & WebUrl) Next End Sub