Syntax

expression.CubeFields

expression A variable that represents a PivotTable object.

Example

This example creates a list of cube field names for the data fields in the first OLAP -based PivotTable report on Sheet1.

Visual Basic for Applications
Set objNewSheet = Worksheets.Add objNewSheet.Activate intRow = 1 For Each objCubeFld In Worksheets("Sheet1").PivotTables(1).CubeFields If objCubeFld.Orientation = xlDataField Then objNewSheet.Cells(intRow, 1).Value = objCubeFld.Name intRow = intRow + 1 End If Next objCubeFld
cube cube fields Cube Fields Property CubeField CubeField Property cubefields cubefields property

See also: