The last line of code below errors out. What is the proper syntax for getting the name of the pivot table that is in A2?
Code:
Sub GetPTName
Dim PTCache As PivotCache, PT As PivotTable
Set PTCache = ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase,SourceData:=Range("A2").CurrentRegion)
Set PT = ActiveSheet.PivotTables.Name
end sub