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  

Updating hyperlinks



 
 
Thread Tools Display Modes
  #1  
Old December 2nd, 2003, 04:06 PM
Andy Wilkinson
external usenet poster
 
Posts: n/a
Default Updating hyperlinks

Hi all,

I have an excel spreadsheet that references numerous other
spreadsheets via hyperlinks. The problem is the xls was
designed with the supporting spreadsheets in a defined
structure, i.e. c:\work\2003\stuff\stuff.xls

Is there any way that I can update all of the hyperlinks
at the same time to reflect a year change?? For example,
copy the entire structure to c:\work\2004 etc .... and
then update all of the hyperlinks to be 2004, not 2003.

Thanks in advance

Andy Wilkinson
  #2  
Old December 3rd, 2003, 01:16 AM
Bill Manville
external usenet poster
 
Posts: n/a
Default Updating hyperlinks

Andy Wilkinson wrote:
Is there any way that I can update all of the hyperlinks
at the same time to reflect a year change?? For example,
copy the entire structure to c:\work\2004 etc .... and
then update all of the hyperlinks to be 2004, not 2003.


Sub UpdateHyperlinks()
Dim H As Hyperlink
For Each H In ActiveSheet.Hyperlinks
H.Address = Replace(H.Address, "2003", "2004")
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 09:12 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.