Macro to collapse all dimension columns of a pivot table
as you can see in this snapshot that you have 5 dimensions with some rows expanded.
we need to give the use the possibility to collapse all dimensions. if you click "Collapse dimension columns", they get collapsed, however f you click back the +, the old expansion will return as is. so the "Collapse dimension columns" just collapses the 1st one. and what is not really user friendly is that a user might drill down a chart on a day, and many days later open that chart to find it expanded, so the user will have to collapse each column one by one.
is there a way to write a macro that loops the dimensions, and collpases them one by one?