共用方式為


Excel) (PivotField.AutoShowRange 屬性

如果排名靠前的項目自動顯示在指定的樞紐分析表欄位中,則傳回 xlTop常數 ;如果顯示底部項目,則傳回 xlBottom 。 唯讀的 Long

語法

表達。自動顯示範圍

代表 PivotField 物件的變數。

範例

本範例將在訊息方塊中顯示 Salesman 欄位的 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 支援與意見反應