close

I would like to create a formula that puts the date the file was last
saved/updated.

Any help is appreciated

Hal

You can't do it with a formula, you'd need VBA code like in 'This Workbook'

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Sheet1.Range(quot;A1quot;) = Date
End Sub

Regards,
Alan.

quot;Halquot; gt; wrote in message
news
gt;I would like to create a formula that puts the date the file was last
gt; saved/updated.
gt;
gt; Any help is appreciated
gt;
gt; Hal
'-----------------------------------------------------------------
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 (quot;last authorquot;)
or
=DocProps (quot;last save timequot;)
--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

quot;Halquot; gt; wrote in message
news
gt; I would like to create a formula that puts the date the file was last
gt; saved/updated.
gt;
gt; Any help is appreciated
gt;
gt; Hal

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()