Home > Mobile >  Open multiple URLs in separate Google Chrome browser windows
Open multiple URLs in separate Google Chrome browser windows

Time:03-14

I have a bunch of links that I need to open up on a daily basis on separate Google Chrome windows

The 7 links are listed within column A of the rawdata worksheet

I have been able to create this VBA code in Excel which opens up all of the links that I need under one Google Chrome window with each link opening up on its own separate tabs.

Sub openurl()
Dim ChromeLocation As String
Dim MyURL As String
Dim i As Integer
Dim ws1 As Worksheet
Dim lastRow As Long
Range("A1").Select
lastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Set ws1 = Sheets("rawdata")
ChromeLocation = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" 'location of Chrome.exe in your PC
For i = 1 To lastRow
MyURL = ws1.Cells(i, 1)
    Shell (ChromeLocation & " -url -newtab " & MyURL)
Next i
End Sub

Is there a way that I could get the links to open up on separate Google Chrome windows instead of separate tabs? If so how do you go about doing that?

Thank you for your time and consideration regarding this matter.

CodePudding user response:

Only change this line

    Shell (ChromeLocation & " -new-window " & MyURL)

CodePudding user response:

Thank you so much, I greatly appreciate the help, this was definitely bothering me. So glad that I have joined this Stack Overflow community, my issues became someone else's concern and with their expertise we were able to resolve it.

  • Related