ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PivotTable, Pivotfield selective invisible, too slow (https://www.excelbanter.com/excel-programming/282152-pivottable-pivotfield-selective-invisible-too-slow.html)

MSN

PivotTable, Pivotfield selective invisible, too slow
 
Hi,

If the row in PivotTable are all "0", I want to make it invisible.

Dim PI as PivotItem

For each PI in PT.PivotFields("Account")
IF ...row = 0.... Then
PI.visible=False
Else
PI.visible=True
End IF
Next PI

It works, but PivotTable seems to update itself all the time, and it takes
too long to update the whole table.

I tried to use PT.ManualUpdate=False at the beginning, and then
PT.ManualUpdate=True at the end of the code. But the macro doesn't seem to
work.

Is there a quicker way?

Thanks a lot.

Sam






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

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