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
|