set cell value and workbook Creation date

  • Thread starter William Hamilton
  • Start date
W

William Hamilton

How can I set the value of a cell with the creation date of the workbook?

Each workbook is beaing created from a custom template.

TIA

W
 
B

Bernie Deitrick

William,

Either through a macro or through a User-Defined-Function:

Sub TryNow()
ActiveCell.Value = ActiveWorkbook.BuiltinDocumentProperties("Creation
Date").Value
End Sub

Use this like

=CD()

Function CD() As Variant
CD = Application.Caller.Parent.Parent.BuiltinDocumentProperties("Creation
Date").Value
End Function

HTH,
Bernie
MS Excel MVP
 
Top