Inserting the Date the File was Created

J

Jeff Harwood

I am creating a template (several templates actually). In each of these templates it would be helpful ot insert the date that the .xls file is created from the template rather than having to remember to change/type the correct date into the cell. (I am all about automating.) Anyone know a solution to this one. Thanks
 
F

Frank Kabel

Hi
not possible without using VBA. One way: insert the following code in
one of your modules:
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

Now use it in a cell like
=DOCPROPS("Creation date")
and format this cell as date
 
T

Tom Culp

Jeff,

You could include the date in header or footer. This will show the date of last file modification if that will work but will not keep the date of original creation. Frank's post will do that.

Tom
 
Top