Snake Eyes
Board Regular
- Joined
- Dec 14, 2010
- Messages
- 105
- Office Version
- 365
- 2016
- Platform
- Windows
I have a workbook that has several (cell) references to cells in other workbooks. I would like to find a way, via macro, to change the path to the cells in the other workbooks.
I use this code to change hyperlinks but now I need code to update individual cell references. The path to be changed is the same.
Thanks
Snake Eyes
I use this code to change hyperlinks but now I need code to update individual cell references. The path to be changed is the same.
Code:
Sub Reset_HL_Path()
Dim hl As Hyperlink
For Each hl In ActiveSheet.Hyperlinks
hl.Address = Replace(hl.Address, "C:\Users\username\Application Data\Microsoft\Excel\", "G:\Data Files\Company Name\Expense Reports\")
Next
End Sub
Thanks
Snake Eyes