편집

다음을 통해 공유


CubeField.PivotFields property (Excel)

Returns the PivotFields collection. This collection contains all PivotTable fields, including those that aren't currently visible on-screen. Read-only PivotFields object.

Syntax

expression.PivotFields

expression An expression that returns a CubeField object.

Return value

PivotFields

Remarks

For Online Analytical Processing (OLAP) data sources, there are no hidden fields, and the object or collection that's returned reflects what's currently visible.

Example

This example creates a list of all the PivotTable field names used in the first PivotChart report.

Set objNewSheet = Worksheets.Add 
objNewSheet.Activate 
intRow = 1 
For Each objPF In _ 
 Charts("Chart1").PivotLayout.PivotFields 
 objNewSheet.Cells(intRow, 1).Value = objPF.Caption 
 intRow = intRow + 1 
Next objPF

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.