ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PivotItem.Visible (https://www.excelbanter.com/excel-programming/331738-pivotitem-visible.html)

Excelgeek

PivotItem.Visible
 

Hi all,

within a (Excel 2000) pivot table, I'd like to hide all items except of
one, which is named 'Total'.
The item list can change, so hiding item by item does not work.The
function could look like:

..PivotItem.Visible = False
..PivotItem("Total").Visible = True

I am looking for a function to hide all items at once. Any ides?

Best regards & thanks for help,
the Excelgeek


--
Excelgeek
------------------------------------------------------------------------
Excelgeek's Profile: http://www.excelforum.com/member.php...o&userid=24285
View this thread: http://www.excelforum.com/showthread...hreadid=378940


Debra Dalgleish

PivotItem.Visible
 
There's no "HideAll" method, but there's sample code here to loop
through the list and hide or show items:

http://www.contextures.com/xlPivot03.html

Excelgeek wrote:
Hi all,

within a (Excel 2000) pivot table, I'd like to hide all items except of
one, which is named 'Total'.
The item list can change, so hiding item by item does not work.The
function could look like:

PivotItem.Visible = False
PivotItem("Total").Visible = True

I am looking for a function to hide all items at once. Any ides?

Best regards & thanks for help,
the Excelgeek




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


Dave Peterson[_5_]

PivotItem.Visible
 
Take a look at Debra Dalgleish's code:

http://www.contextures.com/xlPivot04.html
look for: Sub DeleteOldItemsWB()


She deletes items (instead of .visible = false), but that's easy to change.



Excelgeek wrote:

Hi all,

within a (Excel 2000) pivot table, I'd like to hide all items except of
one, which is named 'Total'.
The item list can change, so hiding item by item does not work.The
function could look like:

PivotItem.Visible = False
PivotItem("Total").Visible = True

I am looking for a function to hide all items at once. Any ides?

Best regards & thanks for help,
the Excelgeek

--
Excelgeek
------------------------------------------------------------------------
Excelgeek's Profile: http://www.excelforum.com/member.php...o&userid=24285
View this thread: http://www.excelforum.com/showthread...hreadid=378940


--

Dave Peterson


All times are GMT +1. The time now is 03:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com