Date in Header/Footer

N

Nick

Does anyone know how to put the latest "revision date" in
the header or footer. All I can get is the date printed
or any text I may put in. I would like it to
automatically update the header/footer with the date any
changes are made.

Please help,

Nick
 
B

Bob Phillips

Hi Nick,

Private Sub Workbook_BeforePrint(Cacel As Boolean)
With ActiveWorkbook
.ActiveSheet.PageSetup.LeftHeader = "Last saved on: " & _
Format(.BuiltinDocumentProperties("Last Save Time"), "dd mmm
yyyy")
End With
End Sub

goes in the ThisWorkbook code module

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
F

Frank Kabel

Hi
you need VBA for this. Put the following code in your
workbook module (not in a standard module):
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ActiveWindow.Worksheets
With wkSht.PageSetup
.LeftHeader = Me.BuiltinDocumentProperties _
("last save time")
End With
Next wkSht
End Sub
 
Top