Excel 2003 Hide PivotItems

L

Lee

I have just upgraded to Excel 2003. I have a Pivot Table which is created
using VBA code which worked fine prior to the upgrade.

When the following bit of code executes, the incorrect PivotItem is made
invisible:

With ActiveSheet.PivotTables("PivotTable1").PivotFields("State (seq)")
.PivotItems("09 - Close").Visible = False
End With

Instead of "09 - Close" being made invisible, another item "01 - Open" is
made invisible.

Also, when manually checking items to be visible or invisible, sometimes the
first and last items turn on/off with the Show all items check box.

Is this a known issue? We've already installed the service pack. Are there
any other fixes available?

Thanks
 
L

Lee

Well I haven't found other posts where anyone else is experiencing this
problem.

But my solution, for now is to make visible the item which is being hidden
in error and to add another line to make the item I want hidden invisible, as
follows:

With ActiveSheet.PivotTables("PivotTable1").PivotFields("State (seq)")
.PivotItems("09 - Close").Visible = False
.PivotItems("01 - Open").Visible = True
.PivotItems("09 - Close").Visible = False
End With
 

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