Hi all,
I keep getting this error code and i have tried several options to fix it but cant seem to figure it out. My macro is in the workbook and i use it to load data and it creates several tabs out of that data. On the tab "On Call Summary" i just need a pivot from the data in tab "Current Period".
The error highlights the section starting at "ActiveWorkbook.PivotCaches..."
Help is greatly appreciated guys!
I keep getting this error code and i have tried several options to fix it but cant seem to figure it out. My macro is in the workbook and i use it to load data and it creates several tabs out of that data. On the tab "On Call Summary" i just need a pivot from the data in tab "Current Period".
The error highlights the section starting at "ActiveWorkbook.PivotCaches..."
Help is greatly appreciated guys!
Code:
Sheets.Add.Name = "On Call Summary"
Sheets("Current Period").Activate
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
ActiveSheet.UsedRange, Version:=xlPivotTableVersion14).CreatePivotTable _
TableDestination:=Sheets("On Call Summary").Range("A1"), TableName:="PivotTable1", DefaultVersion _
:=xlPivotTableVersion14