date file modified

  • Thread starter Thread starter Matthew
  • Start date Start date
M

Matthew

Is there any way (header/footer or in a cell) to display the date the
workbook was modified? I know you can look up the modified date in
File/Properties, but don't know how to display that.
 
One way to do this would be to write a Workbook_BeforeSave event macro
that populates a particular cell with the current time and date. That
will be a static value that won't change until the next save, and will
thereby represent the "last modified" time.
 
'-----------------------------------------------------------------
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


and enter in a cell such as
=DocProps ("last author")
or
=DocProps ("last save time")

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Back
Top