Putting Printdate in header/Footer

D

Dmanley80

Does anybody know is it possible to put printdate in the
header or footer of an excel sheet?
Thank you.
 
F

Frank Kabel

Dmanley80 said:
Does anybody know is it possible to put printdate in the
header or footer of an excel sheet?
Thank you.

Hi
You have to use the workbook event Before_print to insert
cell values into the header/footer. e.g.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ActiveWindow.SelectedSheets
With wkSht.PageSetup
.CenterHeader = Format(Now, "mm-dd-yyyy")
End With
Next wkSht
End Sub

This will insert the current date in your header

Frank
 
J

JMay

This feature is already provided in the Page Setup; Drill down to the
Header/Footer screen click in the Left Footer Box then click on an Icon with
a small calendar "8.7"
then OK out; Time is also available see the clock?
 

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

Similar Threads


Top