Complete the code to filter the PivotTable to show only items labeled "East" in the Region field.
ActiveSheet.PivotTables("SalesPivot").PivotFields("Region").CurrentPage = [1]
Setting CurrentPage to "East" filters the PivotTable to show only the East region.
Complete the code to clear all filters from the "Product" field in the PivotTable.
ActiveSheet.PivotTables("SalesPivot").PivotFields("Product").ClearAllFilters[1]
The ClearAllFilters() method removes all filters from the specified PivotField.
Fix the error in the code to filter the "Year" field to show only 2023.
ActiveSheet.PivotTables("SalesPivot").PivotFields("Year").CurrentPage = [1]
The CurrentPage property expects a string, so the year must be in quotes.
Fill both blanks to filter the "Category" field to show only "Electronics" and then refresh the PivotTable.
With ActiveSheet.PivotTables("SalesPivot") .PivotFields("Category").CurrentPage = [1] .[2] End With
Set CurrentPage to "Electronics" to filter, then call RefreshTable to update the PivotTable display.
Fill all three blanks to create a filter on the "Region" field that shows only "North", then clear all filters on the "Product" field.
With ActiveSheet.PivotTables("SalesPivot") .PivotFields("Region").CurrentPage = [1] .PivotFields("Product").[2][3] End With
Set the Region filter to "North" (string), then call ClearAllFilters() on the Product field to remove filters.