How to insert date last saved into the sheet (not the footer)

C

Crispin Morton

Any ideas?

I want to include a cell which tells me for which date the data in the sheet
is valid - i.e. when it was last saved. I know you can get it from the
properties, but how do you get it into the worksheet proper?
 
B

Bob Phillips

Create a UDF that returns it

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
=DOCPROPS("last save time")
(format cell as date)

obviously, the workbook has to have been saved

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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