Hi everyone,
I've been searching to find a way of changing my pivot table data source from Access file to a local excel sheet (of same file). Is that anyhow possible?
When I select "Change Data Source" From PivotTable Tools / Options, it only allows me to select the second option, "Use an external data source".
I've tried to do it on VBA as well, but I guess I have some points missing therefore I got error. I've used below code and it gives the error - "Run-time error 5 - invalid procedure call or argument"
Could you please help me if it's possible? I've set all charts and calculations based on that pivot table, and I really don't want to start from the beginning.
Thanks a lot!
Cheers,
Selim
I've been searching to find a way of changing my pivot table data source from Access file to a local excel sheet (of same file). Is that anyhow possible?
When I select "Change Data Source" From PivotTable Tools / Options, it only allows me to select the second option, "Use an external data source".
I've tried to do it on VBA as well, but I guess I have some points missing therefore I got error. I've used below code and it gives the error - "Run-time error 5 - invalid procedure call or argument"
Code:
ActiveSheet.PivotTables("PivotTable1").ChangePivotCache ActiveWorkbook. _
PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Sheet1!R89C64:R1265C120", Version:=xlPivotTableVersion14)
Could you please help me if it's possible? I've set all charts and calculations based on that pivot table, and I really don't want to start from the beginning.
Thanks a lot!
Cheers,
Selim