SourceNameStandard Property

Microsoft Excel Visual Basic

expression.SourceNameStandard

expression    Required. An expression that returns one a PivotItem object.

Remarks

This property is used when an item has a localized version and its SourceNameStandard property value differs from the SourceName property value, such as with date formatting.

Example

This example displays the source name for the sixth item on the fifth field of the active PivotTable. The example assumes that a PivotTable exists on the active worksheet and that the data source contains at least five fields and six items per field.

Sub CheckSourceNameStandard()

    Dim pvtTable As PivotTable
    Dim pvtField As PivotField
    Dim pvtItem As PivotItem

    Set pvtTable = ActiveSheet.PivotTables(1)
    Set pvtField = pvtTable.PivotFields(5)
    Set pvtItem = pvtField.PivotItems(6)

    ' Display source name.
    MsgBox "The source name is: " & pvtItem.SourceNameStandard

End Sub