LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Fast way to hide all pivot items in VBA?


Is there a faster way to hide the pivot items in a pivot field than
using a FOR EACH...NEXT statement? It takes roughly 1 second per pivot
item to change it's visibility.

I'm using the following code:

Code:
--------------------
For Each pi In ActiveSheet.PivotTables("PivotTable1").PivotFields ("BILL_TO_CUST_NAME").PivotItems
pi.Visible = False
Next
--------------------


_The_pivot_field_has_a_couple_hundred_items_in_it_ and only 5 need to
be visible; the rest need to be hidden. I'm using code to filter the
table several ways and save each result for another report. The
original report is automatically created by IT and they said that's the
way the report is going to stay.

Suggestions?


--
Air_Cooled_Nut


------------------------------------------------------------------------
Air_Cooled_Nut's Profile: http://www.excelforum.com/member.php...o&userid=15730
View this thread: http://www.excelforum.com/showthread...hreadid=501870

 
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
hide items with no data in pivot table Heather Excel Discussion (Misc queries) 0 April 16th 10 08:58 PM
Pivot Table: How do I hide calculated items that result in zero? David ML Charts and Charting in Excel 1 December 19th 06 05:50 PM
How can I hide zero rows in a pivot table with calculated items? Knowledge Networks Excel Programming 0 October 23rd 04 12:35 AM
Pivot Table: Hide Items Poperty JonS Excel Programming 0 October 28th 03 03:26 AM
Auto Hide Pivot Table Items lpolliard Excel Programming 1 October 9th 03 09:34 AM


All times are GMT +1. The time now is 04:32 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"