Get pivotTable handle from cell in vba

2019-09-06 08:33发布

For instance I have a pivot table on every third worksheet that needs to be edited, on the worksheet is 3 pivot tables, I don't actually know the name of the table but I know it lies on $N$2, is there anyway to get the name or handle of the pivot table from the cell?

1条回答
We Are One
2楼-- · 2019-09-06 08:55

The Range object has a PivotTable property that returns the object you want

Set pt = MySheet.Range("N2").PivotTable
查看更多
登录 后发表回答