File Modification Date...

  • Thread starter Thread starter Steven
  • Start date Start date
S

Steven

Is there any way to insert into the spreadsheet the date
the spreadsheet was last modified?

Thanx.
 
Not last modified, but you can get last saved date with VBA.

This UDF will give you that

Function DocProperty(property As String)

DocProperty = ActiveWorkbook.BuiltinDocumentProperties(property)

End Function

use like so

=DocProperty("Last Save Time")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Cool.

So...if I wanted to stick that in my excel spreadsheet,
how, exactly, would I go about doing that?

Thanx again.
 
Steven,

Open up the VBA editor (Alt + F11)
Right Click on "ThisWorkbook" in the "Projects" window.
Select Insert/Module
In the module that appears on the right, copy and paste Bob's code:

Function DocProperty(property As String)
DocProperty = ActiveWorkbook.BuiltinDocumentProperties(property)
End Function

Now go back to the workbook and type the following in any cell:

=DocProperty("Last Save Time")

John
 
Steven,

I'm kind of new to VBA but, I put this code in the sheet VBA code. It's
simple but it seams to work for what I need. You can change the range to
what ever cell you need.

Private Sub Worksheet_Change(ByVal Target As Range)
Range("A6") = Now()
End Sub

RAC
 
Back
Top