Issue with Pivotcaches identification

Gringoire

Board Regular
Joined
Nov 18, 2016
Messages
71
Office Version
  1. 365
Platform
  1. Windows
Hello guys,
I use the code below to create a new PivotCache into PivotCaches object:
VBA Code:
Mysheet.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=SourceSheet.ListObjects("TabRawData"), Version:=xlPivotTableVersion15)

It happens that sometime I have more than one PivotCache and I would like to cancel just one of them, but each PivotCache is only referenced as Item1, Item2, etc...
the "Item1" name does not tell me nothing about its contents, so I would like to assign, at creation time, some kind of name to each new PivotCache in order to better handle it.

Unfortunately it seems that PivotCache has no Name property...

Do you know some workaround to obtain the same result?
The property SourceData is useless because it could vary dinamically.

Thanks in advance.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
How would you determine which cache needs replacing? Given that the name is fairly meaningless, what would identify the one to change?
 
Upvote 0

Forum statistics

Threads
1,215,096
Messages
6,123,074
Members
449,093
Latest member
ripvw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top