Microsoft Office Tutorials and References
In Depth Information
Figure 18-5. Outline collapsed to level 2
The same thing can be accomplished using the ShowLevels method of the Outline object,
whose syntax is:
OutlineObject.ShowLevels( RowLevels , ColumnLevels )
For instance, the code:
ActiveSheet.Outline.ShowLevels 2
is equivalent to clicking on the button labeled 2 and has the effect of showing all levels
above and including level 2, as pictured in Figure 18-5 .
Figure 18-5. Outline collapsed to level 2
The PageSetup object
The PageSetup object represents the page formatting (such as margins and paper size) of
an Excel worksheet. Each of the page-formatting options is set by setting a corresponding
property of the PageSetup object.
The PageSetup property of the Worksheet object returns the worksheet's PageSetup object.
The properties and methods of the PageSetup object are shown in Table 18-3 . (All of the
items in Table 18-3 are properties except the PrintQuality method.) Most of the members
in Table 18-3 are self-explanatory (and hold no real surprises), so we will not discuss
them.
Table 18- . Members of the PageSet up Object
Application
FitToPagesWide
PrintErrors<v10>
BlackAndWhite
FooterMargin
PrintGridlines
BottomMargin
HeaderMargin
PrintHeadings
CenterFooter
LeftFooter
PrintNotes
CenterFooterPicture<v10>
LeftFooterPicture<v10>
PrintQuality
CenterHeader
LeftHeader
PrintTitleColumns
CenterHeaderPicture<v10>
LeftHeaderPicture<v10>
PrintTitleRows
CenterHorizontally
LeftMargin
RightFooter
CenterVertically
Order
RightFooterPicture<v10>
ChartSize
Orientation
RightHeader
Creator
PaperSize
RightHeaderPicture<v10>
Draft
Parent
RightMargin
FirstPageNumber
PrintArea
TopMargin
FitToPagesTall
PrintComments
Zoom
To illustrate, the following code sets some of the properties of the active worksheet:
 
 
Search JabSto ::




Custom Search