Microsoft KB Archive/25764

= Printing without Headers or Footers Using PAGE.SETUP in Excel =

Article ID: 25764

Article Last Modified on 11/16/2006

-

APPLIES TO


 * Microsoft Excel 95 Standard Edition
 * Microsoft Excel 5.0c
 * Microsoft Excel 4.0c
 * Microsoft Excel 3.0a
 * Microsoft Excel 2.10d
 * Microsoft Excel 2.1 Standard Edition
 * Microsoft Excel 2.01
 * Microsoft Excel 2.0 Standard Edition
 * Microsoft Excel 5.0 Standard Edition

-



This article was previously published under Q25764



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: KB25764

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.