Edit #1 I am trying to open multiple hyperlinks. All hyperlinks are for .pdf files. The hyperlinks are not sorted i.e. a cell preceding or succeeding a hyperlink might not be a hyperlink. I am using a autofilter based search. Out of let's say 100 visible rows form the autofilter, 60 of them have hyperlinks in a designated column. I would like to open all these files using Excel VBA.
I have been using
Sub tobedeleted()
Dim Selrng As Range
Dim srch_cr As Variant
Set Selrng = Application.InputBox("Select a range", "Obtain Range Object", Type:=8)
srch_cr = Application.WorksheetFunction.Transpose(Selrng)
Dim hl As Hyperlink
On Error Resume Next
For Each hl In srch_cr.Hyperlinks
hl.Follow
Next hl
For Each hl In ActiveWorksheet.Cells.SpecialCells(xlCellTypeVisible).Hyperlinks
Next hl
End Sub
I have not been able to open these Hyperlinks.
Also the Designated column uses the Excel function hyperlink and I am basically using a vlookup to get the file location from a dump in another sheet. The Hyperlink function in the column activates the hyperlink.