Repairing Hyperlinks in a Workbook

Snake Eyes

New Member
Joined
Dec 14, 2010
Messages
39
Greetings,
When Excel crashes my hyperlinks placed throughout the workbook break. I am trying to create a macro that will fix the paths of all the broken hyperlinks.
This is what I have:

Code:
Dim hl As Hyperlink
    For Each hl In ActiveWorkbook.Hyperlinks
        Debug.Print hl.Address
        hl.Address = Replace(hl.Address, "C:\Users\name\Application Data\Microsoft\Excel", "G:\Data Files\VMS\")
    Next
I get this error when I try to run it...
Run Time Error '438':
Object doesn't support this property or method. Can someone guide me on what the correct code would be?

Kindest Regards.
 

Forum statistics

Threads
1,078,367
Messages
5,339,783
Members
399,323
Latest member
letitiaysk

Some videos you may like

This Week's Hot Topics

Top