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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|