I am using the following VBA code to open multiple URLs (hyperlinked) on Chrome in seperate tabs:
Dim chromePath As String, hl As Hyperlink
chromePath = Environ("PROGRAMFILES(X86)") & "\Google\Chrome\Application\chrome.exe"
If Selection.Count > 1 Then
'On Error Resume Next
For Each hl In Selection.Hyperlinks
Shell chromePath & " -url " & hl.Address
The code works almost perfectly and I can see the code attempting to open the links on chrome on seperate tabs. However I ran into another issue which I did not forsee in the beginning when attempting to tackle this project. All my hyperlinks (under one column (G)) are being generated by a formula in each cell: =HYPERLINK(G4) / =HYPERLINK(G5) and so on.
In theory, the macro does not seem to be opening the URL in hyperlink but the actual formula itself from which the hyperlink has been generated. Is there any way the above code can be tweaked for the macro to actually open the hyperlink I need to access?
If yes, could you please let me know what I am doing wrong? I have exhausted all possibilities I could think of even tried to look for answers on forums.