PivotField.AutoShowType 属性 (Excel)
如果为指定的数据透视表字段启用了 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 支持和反馈,获取有关如何接收支持和提供反馈的指南。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈