Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pivot Table PivotItems(x&).Visible VBA error

Status
Not open for further replies.

piker42

Programmer
Nov 27, 2001
7
0
0
US
When trying to select only a few items off of a Pivot table's field selection list, I can deselect items from the list if all of the items have been selected with a 'Show All' manually. The VBA code I use is ".PivotItems(5).Visible = False".

However, if I try to select an item that is not visible using the following code ".PivotItems(5).Visible = True", I get the following error:

"Error # 1004 was generated by Microsoft Office Excel. Unable to set the Visible property of the PivotItem class."

I am currently running on XP Pro, SP2, with Excel 2002. If someone could help me find the trick to 'select' and itme rather than 'deselect' an item, I would appreciate it. Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top