Excel) (PivotField.AutoShowType 屬性
如果已針對指定的數據透視表字段啟用 AutoShow,則會傳回 xlAutomatic 常數;如果 AutoShow 已停用,則會傳回 xlManual。 唯讀的 Long。
語法
表達式。AutoShowType
表達 代表 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 支援與意見反應。