Excel Footer

  • Thread starter Thread starter Steven Cooper
  • Start date Start date
S

Steven Cooper

I'm working in a controlled environment and would like to find an easy
way to insert the date last saved into the footer.

-sdc-
 
You must use VBA. Right-click on the excel icon located in the left most
portion of the worksheet menu bar. choose "view code". In the VB editor
that appear paste the following code.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
ActiveSheet.PageSetup.RightFooter = Format(Now(), "mmmm dd,yyyy hh:mm")
End Sub

or if you want to have it all sheet use

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
For each ws in ActiveWorkbook.Sheets
ws.PageSetup.RightFooter = Format(Now(), "mmmm dd,yyyy hh:mm")
Next ws
End Sub

This will put the current date and time in the right footer of your document
every time you save.

I can't think of other easy way.
 
Back
Top