I'm trying to display the last time a file was updated using:
In cell A2 is a file path and name. In cell B2 I typed "=LastSavedTime(A2)", and the result is a #VALUE error. What am I doing wrong?
Code:
Function LastSavedTime(WBName As String) As Date Dim wb As Workbook
Set wb = Workbooks(WBName)
LastSavedTime = wb.BuiltinDocumentProperties("Last Save Time")
End Function
In cell A2 is a file path and name. In cell B2 I typed "=LastSavedTime(A2)", and the result is a #VALUE error. What am I doing wrong?
Last edited: