返回指定数据透视表字段中自动显示的首项号或末项号。
Long 类型,只读。
语法
表达式.AutoShowCount
表达式 一个代表 PivotField 对象的变量。
示例
本示例在消息框中显示“Salesman”字段的 AutoShow 参数值。
示例代码 |
let pi = Worksheets.Item(1).PivotTables(1).PivotFields("salesman")
if(pi.AutoShowType == xlAutomatic){
let rn
let r = pi.AutoShowRange
if(r == xlTop){
rn = "top"
}
else{
rn = "bottom"
}
MsgBox("PivotTable report is showing " + rn + " " + pi.AutoShowCount + " items in " + pi.Name + " field by " + pi.AutoShowField)
}
else{
MsgBox("PivotTable report is not using AutoShow for this field")
}
|