anantheswar
New Member
- Joined
- Oct 4, 2024
- Messages
- 2
- Office Version
- 2016
while filtering the pivot table am getting the application defined error. please help
Sub FilterPivotAmount()
Dim pt As PivotTable
Dim pf As PivotField
Set pt = ThisWorkbook.ActiveSheet.PivotTables("PivotTable2")
Set pf = pt.PivotFields("Name")
pf.ClearAllFilters
pf.Orientation = xlRowField
pf.CurrentPageName = " "
End Sub
Sub FilterPivotAmount()
Dim pt As PivotTable
Dim pf As PivotField
Set pt = ThisWorkbook.ActiveSheet.PivotTables("PivotTable2")
Set pf = pt.PivotFields("Name")
pf.ClearAllFilters
pf.Orientation = xlRowField
pf.CurrentPageName = " "
End Sub