When I go to the actual pivot table it runs fast when I sort and pick manually, but for some reason this code runs very slow in this macro?
HTML Code:Application.ScreenUpdating = False Application.Calculation = xlCalculationAutomatic Sheets("Pivot_Table (2)").Select Range("B3").Select With ActiveSheet.PivotTables("PivotTable5").PivotFields("Group Name") If Range("N1") = 1 Then .PivotItems("Item1").Visible = True .PivotItems("Item2").Visible = True .PivotItems("Item3").Visible = True .PivotItems("Item4").Visible = True .PivotItems("Item5").Visible = True .PivotItems("Item6").Visible = True ............ .PivotItems("Item32").Visible = True End If
I actually have this do this true or false if a certain pulldown is selected...so I have about 33 of these statements (depending upon which item is selected)
Like I said before, if I select all or refresh..the table updates very quickly.
There must be something different about how the 2 work????
Bookmarks