Hey All,
Below macro extracts saved date for files that are hyperlinked in a cell. The issue is that sometimes when running the macro all the hyperlinked cells links gets disrupted, where the hyperlinked cell does not work anymore therefore, the macro errors out as per below error messages in the macro. Pretty weird. Wondering if anyone has any input as to why the below macro works sometime and then does not.
Sub timestamp()
Dim HL As Hyperlink
For Each HL In ActiveSheet.Hyperlinks
On Error GoTo ErrorMsgBox
HL.Range.Offset(0, 1).Value = HL.Address
HL.Range.Offset(0, 1).Value = FileDateTime(HL.Range.Offset(0, 1).Value)
Next
ErrorMsgBox:
MsgBox ("Link Not Found")
Err.Clear
End Sub
Bookmarks