Date last modified - for entire workbook

A

AndrewPace

I am using the following code in a workbook:

Private Sub Workbook_Open()
ActiveSheet.PageSetup.CenterFooter = _
"Last Modified: " & ThisWorkbook.BuiltinDocumentProperties("last save
time").Value
End Sub

It does a great job of changing the "Last Modified: " footer for each
worksheet based on the last time I saved the document. However, I am
seeing that the footer message on other worksheets will not change if I
am not viewing those worksheets while I save.

Is there any way to modify this code so that the footer messages on all
worksheets will change when I save the workbook?
 
G

Gord Dibben

Andrew

Private Sub Workbook_Open()
Dim ws As Worksheet
Set wkbktodo = ActiveWorkbook
For Each ws In wkbktodo.Worksheets
ws.PageSetup.CenterFooter = "Last Modified: " & _
ThisWorkbook.BuiltinDocumentProperties("last save Time").Value
Next ws
End Sub


Gord Dibben MS Excel MVP
 

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