Last Modified 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.
 
G

Guest

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
 
G

Guest

Sub TEST()
s = "H:\Projects\Projects.xls"
dt = FileDateTime(s)
With ActiveSheet.PageSetup
.CenterHeader = dt
End With

End Sub
 

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