Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sub FixLinks()
Dim wks As Worksheet
Dim hl As Hyperlink
Dim sOld As String
Dim sNew As String
Set wks = ActiveSheet
sOld = "G:\MyOriginalFolderIWantToReplaceInPath\"
sNew = ".\"
For Each hl In wks.Hyperlinks
hl.Address = Replace(hl.Address, sOld, sNew)
Next hl
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment