I can't seem to figure out how to determine which rows (or columns) in a PivotTable are collapsed/expanded.
PivotItem.ShowDetail works for some tables but as I understand it DrilledDown is the equivalent for the other types of tables - "data model/OLAP tables".
However, while setting the DrilledDown Property appears to work similar to setting ShowDetail, reading the DrilledDown Property doesn't. The DrilledDown property for every PivotItem appears to be always False even if set to true immediately prior.
The following code expands the Pivot Table but the MsgBox never pops up.
I am certain I am misunderstanding what DrilledDown means or how to access it for a Row "heading". Does anyone know how to step through every configured Row in a "data model" Pivottable and determine if that row is expanded/collapsed?
I did see the following post with zero replies:
https://www.mrexcel.com/forum/excel...illeddown-property.html?highlight=drilleddown
Assumption: PivotField and PivotItem names with square brackets and periods mean the pivottable is a "data model"/"OLAP" pivottable. And that means .ShowDetail doesn't work.
PivotItem.ShowDetail works for some tables but as I understand it DrilledDown is the equivalent for the other types of tables - "data model/OLAP tables".
However, while setting the DrilledDown Property appears to work similar to setting ShowDetail, reading the DrilledDown Property doesn't. The DrilledDown property for every PivotItem appears to be always False even if set to true immediately prior.
The following code expands the Pivot Table but the MsgBox never pops up.
Code:
pvtItem.DrilledDown = True
If pvtItem.DrilledDown = True Then
MsgBox ("!!True!! : " & pvtItem.Name)
End If
I am certain I am misunderstanding what DrilledDown means or how to access it for a Row "heading". Does anyone know how to step through every configured Row in a "data model" Pivottable and determine if that row is expanded/collapsed?
I did see the following post with zero replies:
https://www.mrexcel.com/forum/excel...illeddown-property.html?highlight=drilleddown
Assumption: PivotField and PivotItem names with square brackets and periods mean the pivottable is a "data model"/"OLAP" pivottable. And that means .ShowDetail doesn't work.