Header and footer - placing the date and time stamp

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

Is it possible to place the time and date stamp of the
last time the file was saved into the header or footer?
If so, how?

Thanks,

Jeff

(e-mail address removed)
(e-mail address removed)
 
Well...my lumbering way of doing it is to have a sheet that time stamps
on the workbooks open event. Then it runs a bit o' code to set the
header with that cells value.

Here is an example of what I put together:


Code:
--------------------
Private Sub Workbook_Open()
timeStamp = Now()
Sheets("Sheet1").Range("A1").Value = timeStamp

Dim mySht As Variant

For Each mySht In Worksheets
mySht.PageSetup.LeftHeader = _
Format(Worksheets("Sheet1").Range("A1").Value)
Next

End Sub
--------------------


The above code is date and time stamping in cell A1 of Sheet1. Then it
sets the left header as that cells value....you would paste the above
code into the ThisWorkbook object....

Hope this helps

Dave M.

P.S. forgot to mention I have it set to setting the header for each
sheet in the workbook....
 

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

Back
Top