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 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.