Quote Originally Posted by p45cal View Post
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
The above code runs smooth, but it creates a new slicer for every column in the data sheet.

Say i have 30 columns and selected only 5 filters for a pivot table. The above code is creating 30 slicers. I only need 5 slicers for that pivot fields.