Class PageSetup (Excel VBA)
The class PageSetup represents the page setup description.
The classes Chart and Worksheet. give access to class PageSetup
Dim psp as PageSetup
Set psp = ActiveChart.PageSetup
Properties
AlignMarginsHeaderFooter returns True for Excel to align the header and the footer with the margins set in the page setup options.
BlackAndWhite true if elements of the document will be printed in black and white.
BottomMargin returns or sets the size of the bottom margin, in points.
CenterFooter center aligns the footer information in the PageSetup object.
CenterFooterPicture returns a Graphic object that represents the picture for the center section of the footer. Used to set attributes about the picture.
CenterHeader center aligns the header information in the PageSetup object.
CenterHeaderPicture returns a Graphic object that represents the picture for the center section of the header. Used to set attributes about the picture.
CenterHorizontally true if the sheet is centered horizontally on the page when it's printed.
CenterVertically true if the sheet is centered vertically on the page when it's printed.
DifferentFirstPageHeaderFooter true if a different header or footer is used on the first page.
Draft true if the sheet will be printed without graphics.
EvenPage returns or sets the alignment of text on the even page of a workbook or section.
FirstPage returns or sets the alignment of text on the first page of a workbook or section.
FirstPageNumber returns or sets the first page number that will be used when this sheet is printed. If xlAutomatic, Microsoft Excel chooses the first page number. The default is xlAutomatic (Constants).
FitToPagesTall returns or sets the number of pages tall that the worksheet will be scaled to when it's printed. Applies only to worksheets.
FitToPagesWide returns or sets the number of pages wide that the worksheet will be scaled to when it's printed. Applies only to worksheets.
FooterMargin returns or sets the distance from the bottom of the page to the footer, in points.
HeaderMargin returns or sets the distance from the top of the page to the header, in points.
LeftFooter returns or sets the alignment of text on the left footer of a workbook or section.
LeftFooterPicture returns a Graphic object that represents the picture for the left section of the footer. Used to set attributes about the picture.
LeftHeader returns or sets the alignment of text on the left header of a workbook or section.
LeftHeaderPicture returns a Graphic object that represents the picture for the left section of the header. Used to set attributes about the picture.
LeftMargin returns or sets the size of the left margin, in points.
OddAndEvenPagesHeaderFooter true if the specified PageSetup object has different headers and footers for odd-numbered and even-numbered pages.
Order returns or sets an XlOrder value that represents the order that Microsoft Excel uses to number pages when printing a large worksheet.
Orientation returns or sets an XlPageOrientation value that represents the portrait or landscape printing mode.
Pages returns or sets the count or item number of the pages in the Pages collection.
PaperSize returns or sets the size of the paper.
PrintArea returns or sets the range to be printed as a String using A1-style references in the language of the macro.
PrintComments returns or sets the way comments are printed with the sheet.
PrintErrors sets or returns an XlPrintErrors constant specifying the type of print error displayed. This feature allows users to suppress the display of error values when printing a worksheet.
PrintGridlines true if cell gridlines are printed on the page. Applies only to worksheets.
PrintHeadings true if row and column headings are printed with this page. Applies only to worksheets.
PrintNotes true if cell notes are printed as end notes with the sheet. Applies only to worksheets.
PrintQuality returns or sets the print quality.
PrintTitleColumns returns or sets the columns that contain the cells to be repeated on the left side of each page, as a String in A1-style notation in the language of the macro.
PrintTitleRows returns or sets the rows that contain the cells to be repeated at the top of each page, as a String in A1-style notation in the language of the macro.
RightFooter returns or sets the distance (in points) between the right edge of the page and the right boundary of the footer.
RightFooterPicture returns a Graphic object that represents the picture for the right section of the footer. Used to set attributes of the picture.
RightHeader returns or sets the right part of the header.
RightHeaderPicture returns a Graphic object that represents the picture for the right section of the header. Used to set attributes about the picture.
RightMargin returns or sets the size of the right margin, in points.
ScaleWithDocHeaderFooter returns or sets if the header and footer should be scaled with the document when the size of the document changes.
TopMargin returns or sets the size of the top margin, in points.
Zoom returns or sets a value that represents a percentage (between 10 and 400 percent) by which Microsoft Excel will scale the worksheet for printing.
Related Classes
Graphic - Contains properties that apply to header and footer picture objects.
Page - Represents a page in a workbook. Use the Page object and the related methods and properties for programmatically defining page layout in a workbook.
Pages - A collection of pages in a document. Use the Pages collection and the related objects and properties for programmatically defining page layout in a workbook.