I have a code to open hyperlinks from an excel sheet in chrome. it works just fine, however I have noticed a strange behavior, it opens the hyperlinks not in from up t down order but using some criteria I don't understand it's not randomly because when testing I noticed it always opened the links in tha same order i.e
Hyperlink 1 Hyperlink 2 Hyperlink 3 Hyperlink 4 Hyperlink 5
It would always open
Hyperlink 2 Hyperlink 1 Hyperlink 3 Hyperlink 4 Hyperlink 5
Everytime I ran the code it open them in that order I need it to open the hyperlinks in a top to bottom order. Here is the code
Sub Open_HyperLinks()
Dim chromePath As String, hl As Hyperlink
chromePath = Environ("PROGRAMFILES(X86)") & "\Google\Chrome\Application\chrome.exe"
If Selection.Count > 1 Then
Selection.SpecialCells(xlCellTypeVisible).Select
End If
'On Error Resume Next
For Each hl In Selection.Hyperlinks
Shell chromePath & " -url " & hl.Address
Next hl
End Sub