Printing without Headers or Footers Using PAGE.SETUP in Excel

ID: Q25764


The information in this article applies to:

In Microsoft Excel, use the following macro command to remove the header and footer from the active sheet:


   =PAGE.SETUP("","",0.75,0.75,1,1,TRUE,TRUE) 
The double quotation marks for the header and footer indicate that an empty string is to be used for the header and footer.

In Microsoft Excel versions 5.0 and later, you can use the following code in a Visual Basic module to remove the header and footer from the active sheet:


   With ActiveSheet.PageSetup

      ' Set the value of each header and footer to empty
      .LeftHeader = ""
      .CenterHeader = ""
      .RightHeader = ""
      .LeftFooter = ""
      .CenterFooter = ""
      .RightFooter = ""

   End With 

Additional query words: 2.00 2.0 2.01 2.1 2.10 2.2 2.21 2.20 3.00 3.0 4.00 4.0 5.0


Keywords          : 
Version           : 
Platform          : 
Issue type        : 

Last Reviewed: July 15, 1999