I agree with Peo that it would be simpler to dedicate a portion of the
header/footer for this, but if your consistent with your layout of your footer,
you could look for the time/date and replace it each time the code runs.
For instance, if I put:
This is my file and you shouldn't touch it. Last Saved: 06/02/2004 18:24:33
as my footer, I could strip out the " last updated: mm/dd/yyyy hh:mm:ss" and add
them back with the most recent time/date of save.
Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
Dim myRightFooter As String
Dim myRFPattern As String
Dim myRFPrefix As String
myRFPrefix = " Last Saved: "
myRFPattern = myRFPrefix & "##/##/#### ##:##:##"
For Each wkSht In Me.Worksheets
With wkSht.PageSetup
myRightFooter = .RightFooter
If myRightFooter Like "*" & myRFPattern Then
myRightFooter = Left(myRightFooter, _
Len(myRightFooter) - Len(myRFPattern))
End If
.RightFooter = myRightFooter & myRFPrefix _
& Format(Me.BuiltinDocumentProperties("last save time"), _
"mm/dd/yyyy hh:mm:ss")
End With
Next wkSht
End Sub