VBScript + Access?
Gives an error when I run?
And what error might that be? And is it VBScript or VBA?
"Wrong number of arguments, or invalid property assignment:
That example is close, but I'm having some trouble adapting it to my situation. My table doesen't have any row or column fields, I just dragged all of my table fields into the 'DataAxis' area.
(The thing that confuses/annoys me about this is how he has ActiveData.RowAxis as part of the expression, but when you go to type it in, RowAxis is missing from the autocomplete dropdown list.)
Apparently, this is the way to do it in VBA. Does anyone know the equivalent expression(s) for VBS?
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
Set PvCell = .cells(.RowMembers(0), .ColumnMembers(0))
CellValue = PvCell.DetailCells(RowNum, 4).value