What is the proper way to access the Pivot Items in Power Pivot using VBA?
When I record a macro the syntax seems to be
.CurrentPageName = "[TableName].[ColumnName].&[ItemName]"
I can get my macro to loop correctly if I get the ItemNames from another table and place that in the CurrentPageName string but I'd prefer if it could be done with either index numbers or using the "For each PivotItems in .PivotItems" loop.
When I record a macro the syntax seems to be
.CurrentPageName = "[TableName].[ColumnName].&[ItemName]"
I can get my macro to loop correctly if I get the ItemNames from another table and place that in the CurrentPageName string but I'd prefer if it could be done with either index numbers or using the "For each PivotItems in .PivotItems" loop.