View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.links
Bill Manville Bill Manville is offline
external usenet poster
 
Posts: 473
Default Hyperlink File Path Changes. Hair loss imminent.

OK, so that was a hyperlink you previously fixed.
I assumed you hadn't fixed any of them.
Try this:

Sub ChangeHype()
Dim WS As Worksheet
Dim H As Hyperlink
For Each WS In ActiveWorkbook.Worksheets
For Each H In WS.Hyperlinks
' change it to start after the last \
If InStr(H.Address,"\")0 Then
Debug.Print H.Address
H.Address = Mid(H.Address,InStrRev(H.Address,"\"))
End If
Next
Next
End Sub

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup