reading from a table cell?
Does anyone know what the equivalent statements in VBScript would be for the following?
Dim CellValue
Dim ActView As PivotView
Dim fldSets As PivotFieldSets
Dim Sel As PivotDetailRange
Dim RowNum As Long
Dim pvDetCell As PivotDetailCell
Dim PvCell As PivotCell
Set ActView = PvTable.ActiveView
Set fldSets = ActView.FieldSets
Set Sel = PvTable.selection
Set pvDetCell = Sel.BottomRight
RowNum = pvDetCell.Row
With PvTable.ActiveData
Set PvCell = .cells(.RowMembers(0), .ColumnMembers(0))
End With
CellValue = PvCell.DetailCells(RowNum, 4).value
I tried the following to return a cell value:
MsgBox PivotTable5.ActiveData.Cells.DetailCells(0,0).Valu e
but it gives an error. Any ideas? Thanks.
|