TreeviewControl.Hidden property (Excel)

Returns or sets a Variant value that represents the hidden status of the cube field members in the hierarchical member-selection control of a cube field.

Syntax

expression.Hidden

expression A variable that represents a TreeviewControl object.

Remarks

Don't confuse this property with the FormulaHidden property.

The Hidden property returns or sets an array. Each element of the array corresponds to a level of the cube field that is hidden. The maximum number of elements is the number of levels in the cube field. Each element of the array is an array of type String, which contains unique member names that are hidden at the corresponding level of the control.

To determine when members are visible (expanded) in the control, see the DrilledDown property of the PivotItem object.

Example

This example hides the second level member [state].[states].[CA].[Covelo] of the first cube field in the first PivotTable report.

ActiveSheet.PivotTables("PivotTable1").CubeFields(1) _ 
 .TreeviewControl.Hidden = _ 
 Array(Array(""), Array(""), _ 
 Array("[state].[states].[CA].[Covelo]"))

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.