How do I suppress headers/footers in excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When printing more than one page documents in Excel, how do I suppress the
headers and footers OR get different headers/footers on each page.
 
Hi Janet

Only possible with code

The example below will only print the right header on the first page of
the ActiveSheet.

You have this options
(LeftHeader, CenterHeader, RightHeader, LeftFooter, CenterFooter, RightFooter)
Check out the VBA help for all formatting codes.


Sub Test()
Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.RightHeader = "Your Header info"
ActiveSheet.PrintOut From:=1, To:=1
.RightHeader = ""
ActiveSheet.PrintOut From:=2, To:=TotPages
End With
End Sub
 
per Excel HELP: "You can have only one custom header and one custom footer on
each worksheet. If you create a new custom header or footer, it replaces any
other custom header or footer on the worksheet."

What you want can only be accomplished with VBA code

Bruce
 
Back
Top