PivotField.CurrentPageList プロパティ (Excel)

ピボットテーブル レポートの複数アイテムのページ フィールドに含まれるアイテムのリストに対応する文字列の配列を返すか設定します。 値の取得と設定が可能なバリアント型 (Variant) の値です。

構文

CurrentPageList

PivotField オブジェクトを表す変数。

注釈

実行時エラーを回避するには、データ ソースが OLAP ソースであること、選択したフィールドが現在のページの位置にあること、および EnableMultiplePageItems プロパティが True に設定されている必要があります。

この例では、ピボットテーブル レポートの食品項目を一覧表示するようにページ フィールドを設定します。 ピボットテーブルがアクティブ ワークシート上にあるものとします。

Sub UseCurrentPageList() 
 
 Dim pvtTable As PivotTable 
 Dim pvtField As PivotField 
 
 Set pvtTable = ActiveSheet.PivotTables(1) 
 Set pvtField = pvtTable.PivotFields("[Product]") 
 
 ' To avoid run-time errors set the following property to True. 
 pvtTable.CubeFields("[Product]").EnableMultiplePageItems = True 
 
 ' Set the page list to "Food". 
 pvtField.CurrentPageList = "[Product].[All Products].[Food]" 
 
End Sub

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。