sspatriots
Well-known Member
- Joined
- Nov 22, 2011
- Messages
- 585
- Office Version
- 365
- Platform
- Windows
Good evening,
I found the code below online that is supposed to change the hyperlink file paths to a selected range. Every time I use it, only the cell I select prior to selecting a range gets updated. Just trying to figure out what I'm missing here.
I found the code below online that is supposed to change the hyperlink file paths to a selected range. Every time I use it, only the cell I select prior to selecting a range gets updated. Just trying to figure out what I'm missing here.
VBA Code:
Sub ChangeHyperlinks()
Dim cell As Range
For Each cell In Selection
If cell.Hyperlinks.Count > 0 Then
cell.Hyperlinks(1).Address = Replace(cell.Hyperlinks(1).Address, "..\..\drives\rManufacturing\00-Commercial & Group 2 PO Archive\2023", "H:\Jobs\00 PO ARCHIVE\2023")
End If
Next cell
End Sub