Hi:
I've been trying to write a macro to be able to open multiple hyperlinks all at once. Currently, I have to check thousands of URLs, some of which get removed due to copyright infringement on YouTube. My objective is to be able to track those URLs that have been deleted.
I found the following code:
Sub Open_Hyperlinks()
Dim i, LastRow
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LastRow
If Cells(i, "A").Hyperlinks.Count > 0 Then
Cells(i, "A").Hyperlinks(1).Follow
End If
Next
End Sub
The problem is that when hyperlinks are removed, the code no longer works. Is it possible to write a code so that it can highlight or change the format on error values?
Thanks!
I've been trying to write a macro to be able to open multiple hyperlinks all at once. Currently, I have to check thousands of URLs, some of which get removed due to copyright infringement on YouTube. My objective is to be able to track those URLs that have been deleted.
I found the following code:
Sub Open_Hyperlinks()
Dim i, LastRow
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LastRow
If Cells(i, "A").Hyperlinks.Count > 0 Then
Cells(i, "A").Hyperlinks(1).Follow
End If
Next
End Sub
The problem is that when hyperlinks are removed, the code no longer works. Is it possible to write a code so that it can highlight or change the format on error values?
Thanks!
Last edited: