Placing Workbook Modified Date in WorkSheet Cell

  • Thread starter Thread starter John @ DIB
  • Start date Start date
J

John @ DIB

How can I place the current Workbook's modified date (the
date that shows in Explorer) into a cell in the workbook's
worksheet? I thought there was a function or class I
could access that made all such property values available -
but I cannot remember what it is.
 
Hi
you may use the following user defined function:
Function DocProps(prop As String)
application.volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties (prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function

Now you can use the following formula in one of your cells:
=DocProps("Last save time")
 
Thanks for the suggestion. I have tried entering the
function in VB under both the Workbook and Sheet and I get
a #NAME? error in the cell in either case. Where or how
should I enter the function so it is recognized by the
EXCEL file? Thanks again for your help!
 
Back
Top