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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Change hyperlink throughout excel



 
 
Thread Tools Display Modes
  #1  
Old November 12th, 2009, 04:44 PM posted to microsoft.public.excel.misc
Bryan S
external usenet poster
 
Posts: 2
Default Change hyperlink throughout excel

I found this link in the (Discussion Groups – Excel), Replace hyperlink
throughout excel - Posted 5/2/2006. And was hoping to use it to fix some of
the hyperlinks I’ve created that will be changing. It referred me to
http://www.mvps.org/dmcritchie/excel...#FixHyperlinks
Fix Hyperlinks
Sub Fix192Hyperlinks()
Dim OldStr As String, NewStr As String
OldStr = "http://192.168.15.5/"
NewStr = "http://hank.home.on.ca/"
Dim hyp As Hyperlink
For Each hyp In ActiveSheet.Hyperlinks
hyp.Address = Replace(hyp.Address, OldStr, NewStr)
Next hyp
End Sub
This is an example of what I’m hoping to do:
(change) hyperlink
\\Gbserver\Jobs\8900 to 8999\8934 Ridgewater College
(to) hyperlink
\\Gbserver\Jobs\8000’s\8900 to 8999\8934 Ridgewater College

Where a folder is being added to the string but the end location will have
names that vary. It doesn’t seem to be possible to use * (wild character) to
put in place of a different end location for each hyperlink. Any ideas? Help
is greatly appreciated. I'm using MS Excel 2007.
--
Bryan Schafer
  #2  
Old November 12th, 2009, 04:58 PM posted to microsoft.public.excel.misc
Dave Peterson
external usenet poster
 
Posts: 19,791
Default Change hyperlink throughout excel

I'm not sure a single example is enough to show what you really need to do.

But maybe...

OldStr = "\\Gbserver\Jobs\8900"
NewStr = "\\Gbserver\Jobs\8000's\8900"

would be enough


Bryan S wrote:

I found this link in the (Discussion Groups – Excel), Replace hyperlink
throughout excel - Posted 5/2/2006. And was hoping to use it to fix some of
the hyperlinks I’ve created that will be changing. It referred me to
http://www.mvps.org/dmcritchie/excel...#FixHyperlinks
Fix Hyperlinks
Sub Fix192Hyperlinks()
Dim OldStr As String, NewStr As String
OldStr = "http://192.168.15.5/"
NewStr = "http://hank.home.on.ca/"
Dim hyp As Hyperlink
For Each hyp In ActiveSheet.Hyperlinks
hyp.Address = Replace(hyp.Address, OldStr, NewStr)
Next hyp
End Sub
This is an example of what I’m hoping to do:
(change) hyperlink
\\Gbserver\Jobs\8900 to 8999\8934 Ridgewater College
(to) hyperlink
\\Gbserver\Jobs\8000’s\8900 to 8999\8934 Ridgewater College

Where a folder is being added to the string but the end location will have
names that vary. It doesn’t seem to be possible to use * (wild character) to
put in place of a different end location for each hyperlink. Any ideas? Help
is greatly appreciated. I'm using MS Excel 2007.
--
Bryan Schafer


--

Dave Peterson
 




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 02:30 PM.


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