Show file creation date in header

  • Thread starter Thread starter Amy
  • Start date Start date
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!!!
 
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)
 
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)




.
 
Back
Top