insert date

  • Thread starter Thread starter kj
  • Start date Start date
K

kj

Hello,
Excel 2000. How might I insert the document last saved
date into header or footer? Not into a cell.
 
You need a sub to do this
This will only work if you are using Excel 2000 or higher

Place this in the thisworkbook module

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ActiveWindow.SelectedSheets
wkSht.RightFooter = "&8Last Saved : " & _
ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
Next wkSht
End Sub

If you use Excel 97 post back
 
Oops, not my day

Use this

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ActiveWindow.SelectedSheets
wkSht.PageSetup.RightFooter = "&8Last Saved : " & _
ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
Next wkSht
End Sub
 
Back
Top