I recorded a macro to get the correct syntax for the header section that I
wanted. I used .leftheader in this code:
Option Explicit
Sub PrintLots()
Dim wks As Worksheet
Dim iDate As Date
Dim StartDate As Date
Set wks = Worksheets("Sheet1")
'first of the month. I used October 1, 2007
StartDate = DateSerial(2007, 10, 1)
'from the start date to the last day of the month
For iDate = StartDate To DateSerial(Year(StartDate), _
Month(StartDate) + 1, 0)
With wks.PageSetup
.LeftHeader = "whateveryouwanthere " & Format(iDate, "mm/dd/yyyy")
End With
wks.PrintOut preview:=True
Next iDate
End Sub
If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm