Clear pivot table filters

Turbo613

Board Regular
Joined
Mar 2, 2007
Messages
134
Overview
I have 7 pivot tables on one workbook in Excel2003. I have a combo box that updates all the pivot tables at the same time. The combo box references a named range via an index function. The lookup table that the index function and combo box uses is set as a named range that can expand or contract; im not sure if that is important, but here is the code I have for the named range called "Office2" =OFFSET(Pivot!$L$100,0,0,COUNT(Pivot!$L:$L),1).

Problem
Most of the time the pivots work when I use the dropdown box. but on ocassion, they don't update to the new data from the combo box. I think I need to use a feature that is available in Excel2007 called ClearAllFilters, but I don't know what that is called or how to do it in Excel2003 VBA coding and I need help.

Code
Here is the module the Combo box references:

Sub ProPivotCombo()

ActiveSheet.PivotTables("Pvt1").PivotFields("OfficeNumber").CurrentPage = Range("N98").Text

ActiveSheet.PivotTables("Pvt2").PivotFields("OfficeNumber").CurrentPage = Range("N98").Text

ActiveSheet.PivotTables("Pvt3").PivotFields("OfficeNumber").CurrentPage = Range("N98").Text

ActiveSheet.PivotTables("Pvt4").PivotFields("OfficeNumber").CurrentPage = Range("N98").Text

ActiveSheet.PivotTables("Pvt5").PivotFields("OfficeNumber").CurrentPage = Range("N98").Text

ActiveSheet.PivotTables("Pvt6").PivotFields("OfficeNumber").CurrentPage = Range("N98").Text

End Sub[/b]
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
This code will clear old data from all your pivot tables:
Code:
Sub Clean_Pivots()
Dim ws As Workbook
Dim pt As PivotTable
    For Each ws In Workbooks
        For Each pt In ActiveSheet.PivotTables
            pt.PivotCache.MissingItemsLimit = xlMissingItemsNone
        Next
    Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,887
Messages
6,122,095
Members
449,064
Latest member
Danger_SF

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top