A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Links and Linking
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hyperlink File Path Changes. Hair loss imminent.



 
 
Thread Tools Display Modes
  #11  
Old September 10th, 2009, 01:15 PM posted to microsoft.public.excel.links
Davius
external usenet poster
 
Posts: 7
Default Hyperlink File Path Changes. Hair loss imminent.

So it looks like its trying to establish a hyperlink to the first
file, rather than fixing the hyperlink of the old one. I can change
the cell contents to match the filenames on en mass if this helps.
  #12  
Old September 10th, 2009, 11:10 PM posted to microsoft.public.excel.links
Bill Manville
external usenet poster
 
Posts: 258
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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:00 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.