Outline.ShowLevels method (Excel)

Displays the specified number of row and/or column levels of an outline.

Syntax

expression.ShowLevels (RowLevels, ColumnLevels)

expression A variable that represents an Outline object.

Parameters

Name Required/Optional Data type Description
RowLevels Optional Variant Specifies the number of row levels of an outline to display. If the outline has fewer levels than the number specified, Microsoft Excel displays all the levels. If this argument is 0 (zero) or is omitted, no action is taken on rows.
ColumnLevels Optional Variant Specifies the number of column levels of an outline to display. If the outline has fewer levels than the number specified, Excel displays all the levels. If this argument is 0 (zero) or is omitted, no action is taken on columns.

Return value

Variant

Remarks

You must specify at least one argument.

Example

This example displays row levels one through three and column level one of the outline on Sheet1.

Worksheets("Sheet1").Outline _ 
 .ShowLevels rowLevels:=3, columnLevels:=1

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.