top urgent for Tom Ogilvy

  • Thread starter Thread starter Ramadan
  • Start date Start date
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
 
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.
 
Back
Top