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.
 

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

Similar Threads


Back
Top