Date format in header/footer..

S

Sonja

Is there a way of editing the format in the header / footer? I am
running Office 2000 on a 933MHz P3 with Win98SE and 512MB RAM.

TIA,
-GHB
 
J

JE McGimpsey

You can use a macro:

Put this in your workbook's ThisWorkbook code module (if you're
unfamiliar with macros, see David McRitchie's "Getting Started with
Macros":

http://www.mvps.org/dmcritchie/excel/getstarted.htm

for help):


Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wsSheet As Worksheet
For Each wsSheet In ActiveWindow.SelectedSheets
wsSheet.PageSetup.LeftHeader = Format(Date, "dd mmm yyyy")
Next wsSheet
End Sub

Substitute CenterHeader, RIghtHeader, LeftFooter, etc. as desired (as
well as changing the date format string).
 

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