Gringoire
Board Regular
- Joined
- Nov 18, 2016
- Messages
- 71
- Office Version
- 365
- Platform
- Windows
Hello guys,
I use the code below to create a new PivotCache into PivotCaches object:
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.
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.