shahin
Active Member
I'm trying to develop a macro which should read the cells (Column B in the attached image) connected to different links and print them in immediate window. When I execute what I've created so far, I get "subscript out of range" error.
I used this formula `=HYPERLINK()` to create those named hyperlinks in Column B.
The links in Column A are the placeholders as they may be anywhere. I only showed them to let you know what are within "so","yahoo" and "bing".
Please refer to the image attached which represents how the spreadsheet looks like.
This is where a cross-post https://stackoverflow.com/questions...d-print-some-links-from-some-named-hyperlinks in place.
Code:
Sub PrintURL()
Dim cel As Range
For Each cel In Range("B1:B3")
Debug.Print cel.Hyperlinks(1).Address
Next cel
End Sub
I used this formula `=HYPERLINK()` to create those named hyperlinks in Column B.
The links in Column A are the placeholders as they may be anywhere. I only showed them to let you know what are within "so","yahoo" and "bing".
Please refer to the image attached which represents how the spreadsheet looks like.
This is where a cross-post https://stackoverflow.com/questions...d-print-some-links-from-some-named-hyperlinks in place.