Change hyperlink throughout excel


Bryan S

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
Fix Hyperlinks
Sub Fix192Hyperlinks()
Dim OldStr As String, NewStr As String
OldStr = ""
NewStr = ""
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.



Dave Peterson

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question