How do I suppress headers/footers in excel

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

Ron de Bruin

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
 
G

Guest

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
 

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