Hi,
I've got a workbook with multiple pivot tables on each sheet that I would like users to have limited use to.
I found the following code online which is successful except that I want to limit the ability to reorder all columns (including values columns). Is there a way to limit that?
>>> use code - tags <<<
I've got a workbook with multiple pivot tables on each sheet that I would like users to have limited use to.
I found the following code online which is successful except that I want to limit the ability to reorder all columns (including values columns). Is there a way to limit that?
>>> use code - tags <<<
Code:
Sub RestrictPivotTable()
'pivot table tutorial by contextures.com
Dim pf As PivotField
On Error Resume Next
With ActiveSheet.PivotTables(1)
.EnableDrilldown = True
.EnableFieldList = False
.EnableFieldDialog = False
.PivotCache.EnableRefresh = True
For Each pf In .PivotFields
With pf
.DragToPage = False
.DragToRow = False
.DragToColumn = False
.DragToData = False
.DragToHide = False
End With
Next pf
End With
End Sub
Last edited by a moderator: