Change Hyperlink addresses in a worksheet

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
 
G

Gary''s Student

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top