Class PivotFilter (Excel VBA)
A PivotFilter is applied to a PivotField object.
Member in collection
To use a PivotFilter class variable it first needs to be instantiated, for example
Dim pvtfil as PivotFilter Set pvtfil = ActiveCell.PivotTable.ActiveFilters(Index:=1)
Here is an example of processing the PivotFilter items in a collection.
Dim pvtfil As PivotFilter For Each pvtfil In ActiveCell.PivotTable.PivotFilters Next pvtfil
Delete - Deletes the filter and removes it from the filter collections of the PivotField and the PivotTable.
PivotFilters.Item (Default member) - Returns a specific element of the PivotFilters collection object by its position in the collection.
Active returns whether the specified PivotFilter is active.
DataCubeField this property is applicable only to OLAP PivotTables and provides the Value field (PivotField in the Values area) being filtered by for a value filter.
DataField this property is applicable only to non-OLAP PivotTables and provides the Value field (PivotField in the Values area) being filtered by for a value filter.
Description provides an optional description for the PivotFilter object.
FilterType specifies the type of filter to be applied.
IsMemberPropertyFilter specifies whether the label filter is based on the PivotItem captions of a member property of the field or on the PivotItem captions of the PivotField itself.
MemberPropertyField this property specifies the member property PivotField on which the label filter is based.
Name this property provides the option of naming filters for reference. You cannot rely on the index value for accurate reference because this value can change.
Order specifies the evaluation order of the filter among all Value filters applied to the entire PivotTable.
PivotField specifies the PivotField to which the filter is applied.
Value1 this property is a user-supplied parameter to define a filter for a PivotField.
Value2 this property is a user-supplied parameter to define a filter for a PivotField.
WholeDayFilter sets or gets the filtering semantics for date filters.
PivotFilters.Count returns the number of items in the PivotFilters collection.
CubeField - Represents a hierarchy or measure field from an OLAP cube. In a PivotTable report, the CubeField object is a member of the CubeFields collection.
PivotField - Represents a field in a PivotTable report.