Here is the code that I have used to achieve this
Right click on the sheet where there is a pivot table and click on View Code
Add the following code
Option Explicit
Private Sub Workbook_Open()DisableSectorSelectionEnd Sub
Sub DisableSectorSelection() Dim pt As PivotTable On Error Resume NextSet pt = Selection.PivotTableIf Not pt Is Nothing Then pt.PivotFields("Sector").EnableItemSelection = False
End Sub
Save and reopen the file.
The filter should not be disbaled on the worksheet.
2 comments:
Probably It's past too much time but I need something like your macro, but there's something wrong. It's not work to me!!!!!
Please could you help me?
Sara
It's not work!! what's wrong?
Post a Comment