Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.07 KB

Excel.CubeField.CubeFieldType.md

File metadata and controls

43 lines (30 loc) · 1.07 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
CubeField.CubeFieldType property (Excel)
vbaxl10.chm668073
vbaxl10.chm668073
Excel.CubeField.CubeFieldType
86847717-2906-6f92-36f4-668f932d2237
04/23/2019
medium

CubeField.CubeFieldType property (Excel)

Indicates whether the OLAP cube field is a hierarchy field or a measure field. Can be one of the XlCubeFieldType constants.

Syntax

expression.CubeFieldType

expression A variable that represents a CubeField object.

Example

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

Set objNewSheet = Worksheets.Add 
objNewSheet.Activate 
intRow = 1 
For Each objCubeFld in Worksheets("Sheet1").PivotTables(1).CubeFields 
 If objCubeFld.CubeFieldType = xlMeasure Then 
 objNewSheet.Cells(intRow, 1).Value = objCubeFld.Name 
 intRow = intRow + 1 
 End If 
Next objCubeFld

[!includeSupport and feedback]