Creation Date


Posted by Paul Scofield on January 17, 2002 11:53 AM

How do I store the creartion date in a cell in my workbook?

Posted by Jacob on January 17, 2002 12:00 PM

Hi

Lets say you want the date in cell Z1 on "Sheet1"

Then put this code in the workbook module

sub before_save()
if sheets("Sheet1").range("Z1").value= "" Then
else
sheets("Sheet1").range("Z1").formulaR1C1 = date
end if
end sub

HTH

Jacob



Posted by Tom Urtis on January 17, 2002 12:03 PM

Here's a message box version, which you can adapt to take the value and store it wherever you'd like:

Sub MyCreationDate()
Dim myDate As Date
myDate = ActiveWorkbook.BuiltinDocumentProperties("Creation date").Value
MsgBox myDate
End Sub