Good morning and Happy Holidays!
I have a macro that "repairs" or relinks hyperlinks based on text in the cell. I can't figure out how to have the code run ONLY on cells which already contain a hyperlink. As is now the script just blasts away creating a new hyperlink whether or not one already exists. I want it to determine if the cell has a link and if it does do it's thing, otherwise it should leave the cell alone.
Here's how I create hyperlinks:
I have a macro that "repairs" or relinks hyperlinks based on text in the cell. I can't figure out how to have the code run ONLY on cells which already contain a hyperlink. As is now the script just blasts away creating a new hyperlink whether or not one already exists. I want it to determine if the cell has a link and if it does do it's thing, otherwise it should leave the cell alone.
Here's how I create hyperlinks:
VBA Code:
.Hyperlinks.Add Anchor:=newRange, _
Address:=Sheets("Hyperlinks").Range("I1"), TextToDisplay:=ActiveCell.Text
End With