Show file creation date in header

A

Amy

Happy New Year to all!
Is there any way that I can show the date that the file
was created in the header instead of the current date.
I've been using &Date....but I want the created date.
Even if it's not in the header...is there some way I can
do this in a cell in the spreadsheet??

Thanks for your help and enjoy your holidays!!!
 
B

Bob Phillips

Amy,

You need VBA. This code goes in the ThisWorkbook code module.#

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.PageSetup.RightHeader = "Document created on " & _
Format(ActiveWorkbook.BuiltinDocumentProperties("Creation Date"), _
"dd mmm yyyy")
End With
End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
G

Guest

Thanks..that's just what I needed....
-----Original Message-----
Amy,

You need VBA. This code goes in the ThisWorkbook code module.#

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.PageSetup.RightHeader = "Document created on " & _
Format(ActiveWorkbook.BuiltinDocumentProperties ("Creation Date"), _
"dd mmm yyyy")
End With
End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the 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