Do something along these lines:Sub Add_Slicers2() Set pt = ActiveSheet.PivotTables("10A") TheTop = 140 For Each pf In pt.PivotFields Set sc = ActiveWorkbook.SlicerCaches.Add2(pt, pf.Name) Set SLCR = sc.Slicers.Add(ActiveSheet, , pf.Name, pf.Name, TheTop, 648, 144, 198.75) TheTop = TheTop + 5 For Each sht In ThisWorkbook.Sheets For Each pvt In sht.PivotTables If pvt.CacheIndex = pt.CacheIndex Then sc.PivotTables.AddPivotTable (pvt) Next pvt Next sht Next pf End Sub





Reply With Quote