Last Modified Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can I put the last modified time and date into a header in Excel 2003?

If so, how would I do that?

Thank you in advance.
 
The code below is for the Before_Save event of the workbook. It will put the
current date and time on the right side of the header for all sheets in the
workbook.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim sht As Worksheet
For Each sht In Sheets
sht.PageSetup.RightHeader = "Last Modified On " & Now
Next sht
End Sub
 
Sub TEST()
s = "H:\Projects\Projects.xls"
dt = FileDateTime(s)
With ActiveSheet.PageSetup
.CenterHeader = dt
End With

End Sub
 
Back
Top