Date Last Saved

  • Thread starter Thread starter Sue Kelley
  • Start date Start date
S

Sue Kelley

I would like to have the date that a file was last saved
automatically update on the spreadsheet. I cannot find a
function that does this in Excel.
Lotus has an equivalent function but it can't be converted
to Excel.
 
I would like to have the date that a file was last saved
automatically update on the spreadsheet. I cannot find a
function that does this in Excel.
Lotus has an equivalent function but it can't be converted
to Excel.

You need to use a VB macro.

Open the macro editor (Alt-f11)
Locate your workbook in the list of open workbooks on the left
If there is a [+] next to it, click on it to expand
Locate the "ThisWorkbook" that is a subheading of your workbook

Type the following:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
[A1] = Now
End Sub

You can place any cell reference in the brackets instead of [A1]. Even
precede it by a worksheet name, i.e. [Sheet1!A1] = Now
 
Sue,

Try a UDF like

Function DocProps(prop As String)

On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties(prop)
Exit Function

err_value:
DocProps = CVErr(xlErrValue)
End Function


and can be used like so

=DocProps("Last save time

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Assuming A1 is the target cell -

Insert formula =now()
In <Format><Cells> click on <Custom> and type "File last saved @ "dd/mm/yyyy
[note the punctuation]

Regards.

Bill Ridgeway
Computer Solutions
 
Back
Top