PivotTable: How to reset the CurrentPage to (All)

T

Totem

Hi,

I've got a PivotTable where I programmatically select a number of the items
from the filter:

....
ActiveSheet.PivotTables(1).PivotFields(sPivotField).EnableMultiplePageItems
= True

For Each pvtItem In cPivotItems

ActiveSheet.PivotTables(1).PivotFields(sPivotField).PivotItems(pvtItem).Visible = True
Next pvtItem
....

The problem comes when I just want to clear or reset it to "(All)", nothing
happens when I attempt to execute:

ActiveSheet.PivotTables(1).PivotFields("myField").EnableMultiplePageItems =
False
ActiveSheet.PivotTables(1).PivotFields("myField").CurrentPage = "(All)"

As I have other pivot pages, I can't just do a clear all pivot table because
I would lose the other filters.

Any idea? thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top