Can I add Created Date?

  • Thread starter Thread starter Diane
  • Start date Start date
D

Diane

What is the function to insert file properties? I need
the Created Date to show on each sheet.

Thanks in advance for your help!
Diane
 
Diane,

Compliments of a previous post by Bill Manville......

Function CreateDate()
CreateDate = _
Application.Caller.Parent.Parent.BuiltinDocumentProperties("Creation
Date")
End Function

Put =CreateDate() in a cell and format it as date &/or time, as
required.

John
 
Diane,

You need code, such as

Range("A1").Value = ActiveWorkbook.BuiltinDocumentProperties("Creation
Date")

and formant the cell as date format.
 
Hi,
I'm not completely experienced with macros, but I think I
did it correctly. But, when I put =CreateDate() in a
cell, I get a "Compile Error: Sytax Error" message. And
then in the debugger, the first line is highlighted:
Function CreateDate().

Any ideas?

I REALLY appreciate your help--thanks,
Diane
 
Diane,

Take that code that I gave you and place it in a regular module
in the VBA EDitor.

Alt + F11
Right click on "ThisWorkbook"
Select "Insert/Module"
Paste the following into the panel on the right.

Function CreateDate()
CreateDate =
Application.Caller.Parent.Parent.BuiltinDocumentProperties("Creation
Date")
End Function

Be careful of wordwrap in the above. That CreateDate = should be all one
line.
"Creation Date" should have a space in it.

Then you should be able to use
=Createdate()
in any cell in the workbook.

I'll send you a small file directly with the above coding.

John
 
I tried to also use the formula shown for inserting the date but it
opens back into VBE and says Invalid Outside Procedure and shows the
"Creation Date" highlited.

I am using Excel 2000 9.0.36926 SP-3, does it require another name or
something here?
 
Back
Top