GirishDhruva
Active Member
- Joined
- Mar 26, 2019
- Messages
- 308
Hi everyone,
Here i am trying to create a pivot table from where i have a table named "Live Employees" and from that table i am trying to create a pivot table where i would not be knowing the range of that sheet.I have tried this code but its throwing me some error , can anyone help me out with this ...
Thank you in advance
Here i am trying to create a pivot table from where i have a table named "Live Employees" and from that table i am trying to create a pivot table where i would not be knowing the range of that sheet.I have tried this code but its throwing me some error , can anyone help me out with this ...
Code:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:="Live Employees!" & Sheets("Live Employees").Range("A1").CurrentRegion.Address(ReferenceStyle:=xlR1C1), Version:=xlPivotTableVersion6).CreatePivotTable _
TableDestination:="Salary!R3C1", TableName:="PivotTable6", DefaultVersion:=xlPivotTableVersion6
Thank you in advance