I'm creating pivot tables with VBA and I'd like to know how excel determines the number that the pivot table uses:
Example - TableName:= "PivotTablex" where x is some number. Is there a way that I can control that number?
I'm creating pivot tables with VBA and I'd like to know how excel determines the number that the pivot table uses:
Example - TableName:= "PivotTablex" where x is some number. Is there a way that I can control that number?
It's in order of creation within given workbook. Even if you delete one, number is always incremented by 1 from largest in workbook.
You can control it by naming PivotTable using code.
Ex:Assuming you are creating pivot cache as you create pivot table.
So table name is set using TableName:="string". You can construct this using variable and control what number is tacked on at the end, if so desired.Please Login or Register to view this content.
Note: PivotTable name must be unique within given workbook.
?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
― Robert A. Heinlein
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks