如果为 False,则禁止显示数据透视表字段井的功能。如果已经显示字段列表,则该列表将消失。默认值为 True。Boolean 类型,可读写。
expression.EnableFieldList
expression 必需。该表达式返回一个 PivotTable 对象。
本示例确定数据透视表字段的查看状态,并通知用户。本示例假定 OLAP 数据透视表位于活动工作表上。
Sub CheckFieldWell()
Dim pvtTable As PivotTable
Set pvtTable = ActiveSheet.PivotTables(1)
' Determine if field well can be seen.
If pvtTable.EnableFieldList = True Then
MsgBox "The field well for the PivotTable can be displayed."
Else
MsgBox "The field well for the PivotTable cannot be displayed."
End If
End Sub