Get pivotTable handle from cell in vba
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开发者_Go百科 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?
The Range object has a PivotTable property that returns the object you want
Set pt = MySheet.Range("N2").PivotTable
精彩评论