How do I show file creation date in a cell in Excel?

G

Guest

I need to have a field on a worksheet to show the file creation date. It
can't be in the header or footer as I need to make calculations based on it.
Any clues?

Regards,
Eddie
 
B

Bob Phillips

'-----------------------------------------------------------------
Function DocProps(prop As String)
'-----------------------------------------------------------------
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocument­Properties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function


and enter in a cell such as
=DocProps ("last save time")


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
G

Guest

Hi Eddie

Does this help......

Insert a static date or time
Current date Select a cell and press CTRL+;

Current time Select a cell and press CTRL+SHIFT+;

Current date and time Select a cell and press CTRL+; then SPACE then
CTRL+SHIFT+;

Louise
 
G

Guest

This line of code in an appropriate macro will do it............

Range("b1") = ActiveWorkbook.BuiltinDocumentProperties("Creation Date")

Vaya con Dios,
Chuck, CABGx3
 
G

Guest

The creation date is part of the workbook's builtin document properties and
can be accessed via VBA

thisworkbook.BuiltinDocumentProperties("Creation Date")
 
G

Gord Dibben

Should be........

=DocProps("creation date")

or use this UDF, although I prefer Bob's because it is not specific to one
property.

Function CreaDate() As Date
CreaDate = ActiveWorkbook.BuiltinDocumentProperties("Creation Date")
End Function


Gord Dibben Excel MVP
 
B

Bob Phillips

Thanks Gord, force of habit as most ask for last saved.

--
HTH

Bob Phillips

(remove nothere from 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