Share via


Protection.AllowUsingPivotTables Property

Excel Developer Reference

Returns True if the user is allowed to manipulate pivot tables on a protected worksheet. Read-only Boolean.

Syntax

expression.AllowUsingPivotTables

expression   A variable that represents a Protection object.

Remarks

The AllowUsingPivotTables property applies to non-OLAP source data.

The AllowUsingPivotTables property can be set by using the Protect method arguments.

Example

This example allows the user to access the PivotTable report and notifies the user. It assumes a non-OLAP Pivot Table report exists on the active worksheet.

Visual Basic for Applications
  Sub ProtectionOptions()
ActiveSheet.Unprotect

' Allow pivot tables to be manipulated on a protected worksheet.
If ActiveSheet.Protection.<strong>Allow UsingPivotTables</strong> = False Then
    ActiveSheet.Protect AllowUsingPivotTables:=True
End If

MsgBox "Pivot tables can be manipulated on the protected worksheet."

End Sub

See Also