Hi all,
I have written a code to link a slicer to multiple charts/graphs. But Unable to connect it because it shows ar error stating "Unable to get pivotTables property of the worksheet class". can anyone help me with this.
Below is the my code for connecting slicer with multiple charts/graphs. Here "Year" is the Slicer and "Slicer_Year" is the slicer name
ActiveSheet.Shapes.Range(Array("Year")).Select
ActiveWorkbook.SlicerCaches("Slicer_Year").PivotTables.AddPivotTable ( _
ActiveSheet.PivotTables("Linux"))
ActiveWorkbook.SlicerCaches("Slicer_Year").PivotTables.AddPivotTable ( _
ActiveSheet.PivotTables("Network"))
ActiveWorkbook.SlicerCaches("Slicer_Year").PivotTables.AddPivotTable ( _
ActiveSheet.PivotTables("Unassigned"))
ActiveWorkbook.SlicerCaches("Slicer_Year").PivotTables.AddPivotTable ( _
ActiveSheet.PivotTables("Windows"))
Thanks
I have written a code to link a slicer to multiple charts/graphs. But Unable to connect it because it shows ar error stating "Unable to get pivotTables property of the worksheet class". can anyone help me with this.
Below is the my code for connecting slicer with multiple charts/graphs. Here "Year" is the Slicer and "Slicer_Year" is the slicer name
ActiveSheet.Shapes.Range(Array("Year")).Select
ActiveWorkbook.SlicerCaches("Slicer_Year").PivotTables.AddPivotTable ( _
ActiveSheet.PivotTables("Linux"))
ActiveWorkbook.SlicerCaches("Slicer_Year").PivotTables.AddPivotTable ( _
ActiveSheet.PivotTables("Network"))
ActiveWorkbook.SlicerCaches("Slicer_Year").PivotTables.AddPivotTable ( _
ActiveSheet.PivotTables("Unassigned"))
ActiveWorkbook.SlicerCaches("Slicer_Year").PivotTables.AddPivotTable ( _
ActiveSheet.PivotTables("Windows"))
Thanks