Outline.ShowLevels Method

Excel Developer Reference

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, Microsoft 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.

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

See Also