HiddenItems Method

Applies To

PivotField Object.

Description

Accessor. Returns an object that represents one hidden pivot item (a PivotItem object, Syntax 1) or a collection of all the hidden pivot items (a PivotItems object, Syntax 2) in the specified field. Read-only.

Syntax 1

object.HiddenItems(index)

Syntax 2

object.HiddenItems

object

Required. The PivotField object.

index

Required for Syntax 1. The number or name of the pivot item to return (can be an array to specify more than one).

See Also

ChildItems Method, ParentItems Method, PivotItems Method, VisibleItems Method.

Example

This example adds the names of all the hidden items in the field named "ORDER_DATE" to a list box. The list box appears on Sheet1.


Set pvtTable = Worksheets("Sheet1").Range("A3").PivotTable
Set newListBox = Worksheets("Sheet1").ListBoxes.Add _
    (Left:=10, Top:=72, Width:=144, Height:=144)
Set pvtField = pvtTable.PivotFields("ORDER_DATE")
For Each pvtItem In pvtField.HiddenItems
    newListBox.AddItem (pvtItem.Name)
Next pvtItem
Worksheets("Sheet1").Activate