jakeman
Active Member
- Joined
- Apr 29, 2008
- Messages
- 325
- Office Version
- 365
- Platform
- Windows
Is it possible to select two Page Items for an OLAP Pivot Table? I recently needed to update my macro to include two Page Items in my Pivot Table result set.
Here's my code:
ActiveSheet.PivotTables("PivotTable1").PivotFields("Dept").ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotFields("Dept"). _
EnableMultiplePageItems = True
ActiveSheet.PivotTables("PivotTable1").PivotFields("Dept").CurrentPage = "MHA"
I'd like to add to the above highlighted code "MHA NPV" but whenever I try to add it, it errors on that line. I've tried: ["MHA"].["MHA NPV"] and ("MHA", "MHA NPV") but it doesn't work.
Any ideas or suggestions?
Here's my code:
ActiveSheet.PivotTables("PivotTable1").PivotFields("Dept").ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotFields("Dept"). _
EnableMultiplePageItems = True
ActiveSheet.PivotTables("PivotTable1").PivotFields("Dept").CurrentPage = "MHA"
I'd like to add to the above highlighted code "MHA NPV" but whenever I try to add it, it errors on that line. I've tried: ["MHA"].["MHA NPV"] and ("MHA", "MHA NPV") but it doesn't work.
Any ideas or suggestions?