Arnie Pavlik
asked on
Edit multiple hyperlinks in Excel 2013
I need to change many hyperlinks on an excel spreadsheet to point to a new location. I want to keep the filename the same, just change the network path. I've tried a few different scripts with no success.
This doesn't work:
Sub FixHyperlinks()
Dim wks As Worksheet
Dim hl As Hyperlink
Dim sOld As String
Dim sNew As String
Set wks = ActiveSheet
sOld = "\\servera\2014\DC1\CDP\Ar chive_Targ et\Denise' s Files\Residential Work Orders\"
sNew = "\\NEWSERVER\SharedData\Lo cation\Res idential Maintenance\Denise's Files\Residential Work Orders\"
For Each hl In wks.Hyperlinks
hl.Address = Replace(hl.Address, sOld, sNew)
Next hl
End Sub
Please advise.
This doesn't work:
Sub FixHyperlinks()
Dim wks As Worksheet
Dim hl As Hyperlink
Dim sOld As String
Dim sNew As String
Set wks = ActiveSheet
sOld = "\\servera\2014\DC1\CDP\Ar
sNew = "\\NEWSERVER\SharedData\Lo
For Each hl In wks.Hyperlinks
hl.Address = Replace(hl.Address, sOld, sNew)
Next hl
End Sub
Please advise.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.