如果允许用户在受保护的工作表上操作数据透视表,则返回 True 。 只读 Boolean。
语法
表达式。AllowUsingPivotTables
表达 一个代表 Protection 对象的变量。
备注
AllowUsingPivotTables 属性应用于非 OLAP 源数据。
可以使用 Protect 方法参数设置 AllowUsingPivotTables 属性。
示例
本示例允许用户访问数据透视表并通知用户。 它假定活动工作表上存在非 OLAP 数据透视表。
Sub ProtectionOptions() 
 
 ActiveSheet.Unprotect 
 
 ' Allow PivotTables to be manipulated on a protected worksheet. 
 If ActiveSheet.Protection.Allow UsingPivotTables = False Then 
 ActiveSheet.Protect AllowUsingPivotTables:=True 
 End If 
 
 MsgBox "PivotTables can be manipulated on the protected worksheet." 
 
End Sub
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。