R
Ron Luzius
How can I get a variable range in this VBA code instead of this hard-coded
range?
Every time I run my Excel macro, I will have a different amount of rows to
include in the PivotTable code.
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"'Total Open Discrepancies'!R1C1:R1345C25").CreatePivotTable
TableDestination _
:="", TableName:="PivotTable1"
range?
Every time I run my Excel macro, I will have a different amount of rows to
include in the PivotTable code.
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"'Total Open Discrepancies'!R1C1:R1345C25").CreatePivotTable
TableDestination _
:="", TableName:="PivotTable1"