Working with a few hundred thousand rows of data on Excel 2010 but I can't get my macro to create a PivotCache / PivotTable from my data. The code I'm using is
It works fine as long as there's less than 65 536 rows of data but not with my whole data set.
If I create the PivotTable manually, everything works fine but when I record a macro to see what it says, it's more or less the same (using ".Create" instead of ".Add") but if I try to run the recorded macro it crashes again.
Can anybody help me get around this?
Code:
Dim PC as PivotCache
Set PC = ActiveWorkbook.PivotCaches.Add(xlDatabase, Sheet1.Range("A1").CurrentRegion)
If I create the PivotTable manually, everything works fine but when I record a macro to see what it says, it's more or less the same (using ".Create" instead of ".Add") but if I try to run the recorded macro it crashes again.
Can anybody help me get around this?