如果允许用户在受保护的工作表上处理数据透视表,则返回 True。Boolean 类型,只读。
expression.AllowUsingPivotTables
expression 必需。该表达式返回一个 Protection 对象。
AllowUsingPivotTables 属性应用于非 OLAP 源数据。
可用 Protect 方法的参数设置 AllowUsingPivotTables 属性。
本示例允许用户访问数据透视表并通知用户。本示例假定非 OLAP 数据透视表位于活动的工作表上。
Sub ProtectionOptions()
ActiveSheet.Unprotect
' Allow pivot tables to be manipulated on a protected worksheet.
If ActiveSheet.Protection.Allow UsingPivotTables = False Then
ActiveSheet.Protect AllowUsingPivotTables:=True
End If
MsgBox "Pivot tables can be manipulated on the protected worksheet."
End Sub