如果針對指定的樞紐分析表欄位啟用 AutoShow,則傳回 xlAutomatic常數;如果停用 AutoShow ,則會傳回 xlManual。 唯讀的 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 支援與意見反應。