Is there a way to hide a list of PivotItems in a single command?
Using Excel2010, standard pivot (not OLAP data source)
I'm looking for a way to significantly speed up the code execution.
NB I already suspended the recalculation, the video refresh, set .ManualUpdate = True, ...
So I'm looking for something like <lista_pivotitems> .hide (or .visible = False);
better Hide_list (pivotfield ("xx"), <comma_separates_string_of_value_to_hide>)
Let me explain better, if from the interface you select only a couple of entries in a pivotfield you get the result quickly; on the contrary, if this operation is performed with the macro recorder on, this is translated with n commands of the type
..... and so on
If you then re-run the macro, the time is much greater (in my table there are many possible values to be negated)
Since I can do a massive operation via GUI it seems strange that I can not replicate it from VBA
I have been looking for a solution a lot on internet without success, any suggestions?
PS I have found that in the case of contiguous values of a pivotitem the command can also be carried out
Using Excel2010, standard pivot (not OLAP data source)
I'm looking for a way to significantly speed up the code execution.
NB I already suspended the recalculation, the video refresh, set .ManualUpdate = True, ...
So I'm looking for something like <lista_pivotitems> .hide (or .visible = False);
better Hide_list (pivotfield ("xx"), <comma_separates_string_of_value_to_hide>)
Let me explain better, if from the interface you select only a couple of entries in a pivotfield you get the result quickly; on the contrary, if this operation is performed with the macro recorder on, this is translated with n commands of the type
Code:
With ActiveSheet.PivotTables ("pDoc"). PivotFields ("pir_L4")
.PivotItems ("1208 Costs"). Visible = False
.PivotItems ("1221 - series"). Visible = False
.PivotItems ("1231 - ILS"). Visible = False
If you then re-run the macro, the time is much greater (in my table there are many possible values to be negated)
Since I can do a massive operation via GUI it seems strange that I can not replicate it from VBA
I have been looking for a solution a lot on internet without success, any suggestions?
PS I have found that in the case of contiguous values of a pivotitem the command can also be carried out
Code:
range.delete [/ code] but this is not my case (not contiguos values also in for different
It seems that you do not reach the goal even passing through the sliders and their properties</comma_separates_string_of_value_to_hide></lista_pivotitems>