Colin Macleod
New Member
I'm having a problem setting a page filter. The code is as follows. This seems to work fine if the field contains text but I get an error on the last line if the field contains numerical data. Any help would be very gratefully received. Many Thanks
With ActiveSheet.PivotTables("PivotTable3").PivotFields("Actual Cost")
.Orientation = xlPageField
.Position = 1
End With
ActiveSheet.PivotTables("PivotTable3").PivotFields("Actual Cost").ClearAllFilters
ActiveSheet.PivotTables("PivotTable3").PivotFields("Actual Cost").CurrentPage = "0"
With ActiveSheet.PivotTables("PivotTable3").PivotFields("Actual Cost")
.Orientation = xlPageField
.Position = 1
End With
ActiveSheet.PivotTables("PivotTable3").PivotFields("Actual Cost").ClearAllFilters
ActiveSheet.PivotTables("PivotTable3").PivotFields("Actual Cost").CurrentPage = "0"