VBScript Sample Code for OWC10 (Warning Air Code)
1) Get Value of selected "PivotMember" (Row/Column Member)
Set objPMs = PivotTable.Selection
Set objPM = objPMs(0)
Msgbox objPM.Name & vbCrLf & objPM.UniqueName
2) Get Value of Selected Aggregate
Set objPAggs = PivotTable.Selection
Set objPAgg = objPAggs(0).Aggregates
Msgbox objPAgg.Value
3) Get Value of Selected PivotDetailCell
Set objPDetailRange = PivotTable.Selection
Set objPDetailCell = objPDetailRange.TopLeft
Msgbox objPDetailCell.Value
***************************
There is also the PivotTable.ActiveObject property which
will help deal with multiple RowMember, ColumnMember,
Aggregates and DetailCell selections.
Thx
Dan