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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top