Glory
Well-known Member
- Joined
- Mar 16, 2011
- Messages
- 640
I’m swapping the source range of a pivot table using this method:
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
1) Creating a new pivot table on the same line the new cache is created;
2) Inserting no fields;
3) Reassigning the new cache as the cache of the old table; then,
4) Removing the new table.
<o> </o>
The problem is that when I do this more than once, the new cache begins to bump the older cache up, taking its position for the duration of the code’s execution.
<o> </o>
CacheIndex 5 becomes 6, and the new cache takes position 5.
<o> </o>
So I’m looking for a way to name caches the way you can name some other objects. Is there any way to do this?
<o> </o>
Or is there any simpler way to change the source range of an existing pivot table?
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
1) Creating a new pivot table on the same line the new cache is created;
2) Inserting no fields;
3) Reassigning the new cache as the cache of the old table; then,
4) Removing the new table.
<o> </o>
The problem is that when I do this more than once, the new cache begins to bump the older cache up, taking its position for the duration of the code’s execution.
<o> </o>
CacheIndex 5 becomes 6, and the new cache takes position 5.
<o> </o>
So I’m looking for a way to name caches the way you can name some other objects. Is there any way to do this?
<o> </o>
Or is there any simpler way to change the source range of an existing pivot table?