SourceName Property Example

This example displays the original name (the name from the source database) of the item that contains the active cell.

Worksheets("Sheet1").Activate
ActiveSheet.PivotTables(1).PivotSelect "1998", xlDataAndLabel
MsgBox "The original item name is " & _
    ActiveCell.PivotItem.SourceName