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 支援與意見反應。