LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Using Code to show all pivot items

I have a pivot table called "Relationship" contained within the
worksheet "Relationship Table" which contains a column field called
"Order No" where individual pivot items for this column can be hidden.
I am trying to write code to automatically show all of the pivot items.
When I use the following ShowAllItems command nothing happens. Why?

ThisWorkbook.Worksheets("Relationship
tables").PivotTables("Relationship").PivotFields(" Order
No").ShowAllItems = True

I have also tried to use the following statement in an array to set
each item to visible but that causes me to get the "Run-time error
'1004' Unable to set property of the Pivot Item class" error. What is
really frustrating is that I can use this statement to set the pivot
item visible to false but not to true.

ThisWorkbook.Worksheets("Relationship
tables").PivotTables("Relationship").PivotFields(" Order
No")..PivotItems(i).Visible = True

Any help given would be greatly appreciated.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy and use vba code Giz Excel Discussion (Misc queries) 9 November 22nd 06 09:57 PM
Pivot Chart - show 1 row value, but also showing percentage of who NewChris Charts and Charting in Excel 0 August 30th 06 07:54 PM
Pivot Table using "LIKE" code Cydney Excel Worksheet Functions 1 February 7th 06 01:31 AM
How to show data greater than 10 in pivot table Angus Excel Discussion (Misc queries) 6 September 15th 05 07:51 PM
Pivot Table - Group by Month - Show Items with no data Dan Reynolds Excel Discussion (Misc queries) 0 November 28th 04 01:01 AM


All times are GMT +1. The time now is 05:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"