Hi,
I have noticed when I use the range as a data source it seems to stop working after so many row.
On looking online it seems that the best way is to put it as a string.
I am setting the string as
Which Generates "Database Data!A1:B70000"
I am then setting the cache using
and then
But for some reason it does not create the pivot table.
But for some reason it does not create the pivot table?
Any ideas
Thanks
I have noticed when I use the range as a data source it seems to stop working after so many row.
On looking online it seems that the best way is to put it as a string.
I am setting the string as
Code:
PRange = Source & "!A1:B" & LastRow
Which Generates "Database Data!A1:B70000"
I am then setting the cache using
Code:
Set PCache = ActiveWorkbook.PivotCaches.Create _
(SourceType:=xlDatabase, SourceData:=PRange). _
and then
But for some reason it does not create the pivot table.
Code:
CreatePivotTable(TableDestination:=PSheet.Cells(2, 2), _
TableName:="SalesPivotTable")
But for some reason it does not create the pivot table?
Any ideas
Thanks
Last edited: