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\Archive_Target\Denise's Files\Residential Work Orders\"
    sNew = "\\NEWSERVER\SharedData\Location\Residential 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.
apavlik64Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rspahitzCommented:
This seems to work for me...maybe it's not finding sOld?
Try adding this immediately after the For:

Debug.Print "Pos=" & InStr(hl.Address, sOld) & " for " & hl.Address

In your output window all hyperlinks will be listed and it the pos listed is greater than 0, the replace should be applied.

BTW
If you expect this to change again at some point, it may make more sense to add symbolic links so you don't have to change all these.  i.e. define something on Windows like "Drive N=\\NEWSERVER\SharedData\Location\etc."
then update all your links to use N: and if needed change the definition of N: on Windows.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.