I have two pivot tables on one excel sheet. I would like to know how do you get the name of a selected pivot table with Excel VBA?
I tried ActiveSheet.PivotTables.Selected
, but this is not a supported property.
excelpivot tablevba
I have two pivot tables on one excel sheet. I would like to know how do you get the name of a selected pivot table with Excel VBA?
I tried ActiveSheet.PivotTables.Selected
, but this is not a supported property.
Best Answer
You simply use:
or, with a bit of error handling: