Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@danzek
Created October 26, 2020 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danzek/5f084c7b77a1ec331b5bd3fe8eec0ec8 to your computer and use it in GitHub Desktop.
Save danzek/5f084c7b77a1ec331b5bd3fe8eec0ec8 to your computer and use it in GitHub Desktop.
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