Keenan,
This macro breaks up your XL report into two print jobs and changes the
header/footer based on the values you input. To have this set up your
headers instead of footers, just change .LeftFooter="" to .LeftHeader=""
("" in leaves it blank so put whatever you want inside the ""'s)
Just put it into a VBA project module for your workbook. (Hit Alt+F11 to
access the VBA editor, select the workbook project and Insert|Module)
HTH
PC
Sub PrintPage1NoFooter()
Dim PgCnt As Long
PgCnt = Application.ExecuteExcel4Macro("Get.Document(50)")
With ActiveSheet.PageSetup
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
End With
MsgBox "From the Print Preview screen select ""Close"" to continue
Without printing or ""Print"" to print the selection."
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Preview:=True
With ActiveSheet.PageSetup
.LeftFooter = ActiveWorkbook.Author
.CenterFooter = "Page &P"
.RightFooter = "&D"
End With
MsgBox "From the Print Preview screen select ""Close"" to end without
printing or ""Print"" to print the selection."
ActiveWindow.SelectedSheets.PrintOut From:=2, To:=PgCnt, Preview:=True
End Sub