top urgent for Tom Ogilvy

R

Ramadan

Hi Tom Ogilvy,
Thank you very much for your help
but unforshenetly this macro did not work
I want to explain my procedure to do your macro if it is
correct or not
from tools.........macro........create
and copy paste your code then Run it on this worksheet
and save the worksheet but without finding any change
in the path of the hyperlinks in the sheet.
please if possible give me a detain procedure
because I am not a visual basic programmer.
thank you again very much for your help
 
T

Tom Ogilvy

Sub changelink()

Dim hlink As Hyperlink
For Each hlink In ActiveSheet.Hyperlinks
If InStr(1, hlink.Address, "\data1", vbTextCompare) Then
hlink.Address = Application.Substitute( _
hlink.Address, "\Data1", "\Data1a")
End If
Next

End Sub

I made a slight modification to make sure it was case insensitive, but other
than that, it worked fine for me.

I changed the path information to match my hyperlinks of course.
 

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