Excel) (PivotField.AutoShowRange 屬性

如果頂端專案自動顯示在指定的樞紐分析表欄位中,則會傳回 xlTop 數;如果顯示底部專案,則會傳回 xlBottom 。 唯讀的 Long

語法

運算式AutoShowRange

表達 代表 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 支援與意見反應