Change Hyperlink addresses in a worksheet

  • Thread starter Thread starter LittleAnn
  • Start date Start date
L

LittleAnn

How can I change the address of a hyperlink without having to change the
hyperlinks individually.

I have a worksheet with a few 1000 hyperlinks of the format J:\......... and
want them all changed to M:\.........

Is there an quick way of doing this in one go
 
Sub hyper_changer()
Dim h As Hyperlink
For Each h In ActiveSheet.Hyperlinks
s = h.Address
s2 = Replace(s, "J:\", "M:\")
h.Address = s2
Next
End Sub
 
Back
Top