Question : How to update Hyperlinks in Excel 2003?

I Have a user who has an Excel file with a column for Hyperlinks. These links point to a location in our file server. Due to server consolidation we had moved the data to another server. Now the links in the excel file needs to be updated. There are around 2000 lines of links all pointing to the same server but different locations. For eg.Row1 --> \\serverx\assets department\prod.pdf,
                           Row2 --> \\serverx\Remote Area\prod2.pdf ..

Is there any way  to update all the links with the new servername?

Answer : How to update Hyperlinks in Excel 2003?

It isn't fully clear how presented but try the following which replaces serverx with servery for all hyperlinks on teh activesheet.

Obviously replace bothe strings in teh sub for the actual values required

Chris
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
Sub redirectLink()
Dim rng As Range

    For Each rng In ActiveSheet.UsedRange.Cells
        If rng.Hyperlinks.Count = 1 Then
            With rng.Hyperlinks(1)
                .Address = Replace(.Address, "ServerX", "ServerY", 1, , vbTextCompare)
                .TextToDisplay = Replace(.TextToDisplay, "ServerX", "ServerY", 1, , vbTextCompare)
            End With
        End If
    Next
End Sub
Random Solutions  
 
programming4us programming4us