Static Date & Time in Footer - Excel 2007

  • Thread starter Thread starter Maria Maz
  • Start date Start date
M

Maria Maz

Can anyone tell me if I can have a Date and Time generated in the Footer of a
document at the time of creation, and make it static. So if the document
gets passed on and that someone else saves it, I'll still be able to know
when the doc was created.

Thanks!
 
You could just select all sheets then manually enter the date as text in the
footer.

That would remain static but the footer could be changed by users so not
reliable.

Run event code when you save the workbook would overwrite any user changes.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI _
As Boolean, Cancel As Boolean)
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
With ws.PageSetup
.LeftFooter = "Date Created " & _
Format(ThisWorkbook.BuiltinDocumentProperties("Creation Date"), _
"yyyy-mmm-dd hh:mm:ss")
End With
Next
End Sub

Right-click on the Excel Icon left of "File" or at left end of Title Bar if
window is not maximized and hit "View Code" Copy/paste the above into that
module.

Alt + q to return to Excel then save the workbook.


Gord Dibben MS Excel MVP

On Mon, 26 Jan 2009 07:17:16 -0800, Maria Maz <Maria
 

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

Back
Top