show date of last update...

B

Bob Bob

Need a way so in Cell A1 it shows the last date the file was updated and
saved. Right now it shows the current date which is not working for this
file...
Thanks to all.
 
G

Gord Dibben

Will require either a manual entering of the date CTRL + semi-colon before
saving, or VBA to stamp the date when you save the file.

In Thisworkbook Module paste this code

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
With Sheets("Sheet1")
.Range("A1").Value = Format(ThisWorkbook.BuiltinDocumentProperties _
("Last Save Time"), _
"yyyy-mmm-dd hh:mm:ss")
End With
End Sub

NOTE: workbook must have been saed once before it has any
documentproperties.


Gord Dibben MS Excel MVP
 
Top