Originally Posted by
Vicki-MS
Thanks
This doesn't seem to replace the ID with the value in F5 - it just removes my ID from all the links
** Apologies if you are getting multiple replies - they are not showing my end so not sure if they are posting - I'm new here - please don't hate me!!
Public Sub Change_Hyperlinks()
Dim ws As Worksheet
Dim hlink As Hyperlink
Dim oldID As String
Dim newID As String
oldID = "143655455"
newID = Range("F5").Value
For Each ws In ActiveWorkbook.Worksheets
For Each hlink In ws.Hyperlinks
If InStr(hlink.Address, oldID) > 0 Then
hlink.Address = Replace(hlink.Address, oldID, newID)
End If
Next hlink
Next ws
End Sub
Bookmarks