Skip to content

Latest commit

 

History

History
44 lines (26 loc) · 1005 Bytes

Excel.PivotField.TotalLevels.md

File metadata and controls

44 lines (26 loc) · 1005 Bytes
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PivotField.TotalLevels property (Excel)
vbaxl10.chm240097
vbaxl10.chm240097
Excel.PivotField.TotalLevels
fa50c186-5f6d-41f4-6382-37135159347c
05/07/2019
medium

PivotField.TotalLevels property (Excel)

Returns the total number of fields in the current field group. If the field isn't grouped, or if the data source is OLAP-based, TotalLevels returns the value 1. Read-only Long.

Syntax

expression.TotalLevels

expression A variable that represents a PivotField object.

Remarks

All fields in a set of grouped fields have the same TotalLevels value.

Example

This example displays the total number of fields in the group that contains the active cell.

Worksheets("Sheet1").Activate 
MsgBox "This group has " & _ 
 ActiveCell.PivotField.TotalLevels & " levels

[!includeSupport and feedback]