B
brzak
I find hyperlinks are useful in workbooks, but you have to avoid
renaming worksheets as links don't update.
I've been trying to work out a way of identifying broken hyperlinks in
workbooks, and then go onto offering some way of repairing the link.
However, I've been unable to overcome an early hurdle...
My approach is to:
1 cycle through all worksheets in the workbook concerned
2 cycle through the all hyperlinks within each worksheet
3 for each hyperlink, test whether destination address
(Hyperlinks(i).SubAddress) is valid.
and here lies my problem...
i was after a quick test, something along the lines of:
If IsError ( Range(Hyperlinks(i).SubAddress) ) Then
' *Fix*
End If
However, the error caused by having an invalid range stops my
procedure, whereas I would like it to carry on regardless, only doing
something different when it is in invalid.
Any insights into this problem would be greatly appreciated.
renaming worksheets as links don't update.
I've been trying to work out a way of identifying broken hyperlinks in
workbooks, and then go onto offering some way of repairing the link.
However, I've been unable to overcome an early hurdle...
My approach is to:
1 cycle through all worksheets in the workbook concerned
2 cycle through the all hyperlinks within each worksheet
3 for each hyperlink, test whether destination address
(Hyperlinks(i).SubAddress) is valid.
and here lies my problem...
i was after a quick test, something along the lines of:
If IsError ( Range(Hyperlinks(i).SubAddress) ) Then
' *Fix*
End If
However, the error caused by having an invalid range stops my
procedure, whereas I would like it to carry on regardless, only doing
something different when it is in invalid.
Any insights into this problem would be greatly appreciated.