Skip to main content

PivotField.Caption property

Table of contents
  1. Syntax
  2. Remarks

Returns a String value that represents the label text for the pivot field.



expression A variable that represents a PivotField object.


The following table shows example values of the Caption property and related properties, given an OLAP data source with the unique name "[Europe].[France].[Paris]" and a non-OLAP data source with the item name "Paris".

Property Value (OLAP data source) Value (non-OLAP data source)
Caption Paris Paris
Name [Europe].[France].[Paris] (read-only) Paris
SourceName [Europe].[France].[Paris] (read-only) Same as the SQL property value (read-only)
Value [Europe].[France].[Paris] (read-only) Paris

When specifying an index into the PivotItems collection, you can use the syntax shown in the following table.

Syntax (OLAP data source) Syntax (non-OLAP data source)
expression.PivotItems("[Europe].[France].[Paris]") expression.PivotItems("Paris")

When using the Item property to reference a specific member of a collection, you can use the text index names shown in the following table.

Name (OLAP data source) Name (non-OLAP data source)
[Europe].[France].[Paris] Paris

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>