Hi there.
Can anyone here explain to me why this code doesnt work??
Set rngpivotcol = Range([A12], [A65536].End(xlUp))
y = rngpivotcol.Cells.count
ReDim pivotcol(1 To y, 1)
pivotcol = rngpivotcol
For i = 2 To y
Debug.Print pivotcol(i, 1)
ActiveSheet.PivotTables("PivotTable1").PivotFields(Array(i)).Subtotals = _
Array(False, False, False, False, False, False, False, False, False, False, False, False)
Next i
ActiveSheet.PivotTables("PivotTable1").AddFields RowFields:=pivotcol
It's this last line that doesn't work. I thought that RowFields liked arrays. Oh well, any help appreciated folks.
RET79
This message was edited by RET79 on 2002-04-18 16:56
Can anyone here explain to me why this code doesnt work??
Set rngpivotcol = Range([A12], [A65536].End(xlUp))
y = rngpivotcol.Cells.count
ReDim pivotcol(1 To y, 1)
pivotcol = rngpivotcol
For i = 2 To y
Debug.Print pivotcol(i, 1)
ActiveSheet.PivotTables("PivotTable1").PivotFields(Array(i)).Subtotals = _
Array(False, False, False, False, False, False, False, False, False, False, False, False)
Next i
ActiveSheet.PivotTables("PivotTable1").AddFields RowFields:=pivotcol
It's this last line that doesn't work. I thought that RowFields liked arrays. Oh well, any help appreciated folks.
RET79
This message was edited by RET79 on 2002-04-18 16:56