Doorgaan naar hoofdcontent

Posts

Er worden posts getoond met het label check

Excel: VBA to Check Hyperlinks

I was asked to create a script to check and mark hyperlinks. The following VBA script marks the cells which contains a hyperlink with no match with the color red: Sub HyperLinkCheck()     Dim hypLink As Hyperlink     Dim shtSheet As Worksheet     Dim dirFile As String     For Each shtSheet In Worksheets         For Each hypLink In shtSheet.Hyperlinks             dirFile = hypLink.Address             If Len(Dir(dirFile)) > 0 Then                 'MsgBox "File does exist"                 Worksheets(shtSheet.Name).Range(hypLink.Range.Address).Interior.ColorIndex = xlNone 'no color             Else                 'MsgBox "File does not exist"                 Worksheets...