PivotField.AutoShowCount プロパティ (Excel)

指定したピボットテーブル フィールドに自動的に表示される上位または下位の項目の数を返します。 取得のみ可能な Long 値です。

構文

AutoShowCount

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

次の使用例は、"担当者" フィールドの AutoShow パラメーターを示すメッセージを表示します。

With Worksheets(1).PivotTables(1).PivotFields("salesman") 
 If .AutoShowType = xlAutomatic Then 
 r = .AutoShowRange 
 If r = xlTop Then 
 rn = "top" 
 Else 
 rn = "bottom" 
 End If 
 MsgBox "PivotTable report is showing " & rn & " " & _ 
 .AutoShowCount & " items in " & .Name & _ 
 " field by " & .AutoShowField 
 Else 
 MsgBox "PivotTable report is not using AutoShow for this field" 
 End If 
End With

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

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