Why R1C1 range parameters in VBA Pivot Table setup/
2007 (compatibility mode)
AccountFileBook.PivotCaches.Create(SourceType:=xlD atabase, SourceData:= _
"Pivot of Transactions!R1C1:R2458C4", VERSION:=xlPivotTableVersion10). _
CreatePivotTable TableDestination:="Pivot of Transactions!R1C5", TableName:= _
"PivotOfTrans", DefaultVersion:=xlPivotTableVersion10
Curious why R1C1 style formula references?
Also, why does a range reference like PivotRange
not work i.e.:
Dim myRange as Range
PivotRange = Range(Range("A1:D1"), Range("A1:D1").End(xlDown))
AccountFileBook.PivotCaches.Create(SourceType:=xlD atabase, SourceData:= _
"Pivot of Transactions!" & PivotRange, VERSION:=xlPivotTableVersion10). _
CreatePivotTable TableDestination:="Pivot of Transactions!" & Cells(1, _
PivotRange.Columns.Count +1) , TableName:= _
"PivotOfTrans", DefaultVersion:=xlPivotTableVersion10
TIA EagleONe
|