
Originally Posted by
p45cal
Try changing
For Each pf In pt.PivotFields
to
For Each pf In pt.RowFields
or
For Each pf In pt.PageFields
or
For Each pf In pt.ColumnFields
I got a new issue. now i want to select all the slicers and move to a hidden sheet. I got codes in place to create a new sheet and hide it.
I just want code now to select all the slicers in the activesheet. I also have couple of charts in the same sheet, i dont want to select the charts. i used select all shapes and even charts got selected. so i am looking for something like below.
Sheets.add After:=ActiveSheet
ActiveSheet.Name = "Hidden"
Sheets("Master").Select
' I need code here to select all the slicers in the master sheet.
Selection.ShapeRange.Group.Select
Selection.Cut
Sheets("Hidden").Select
ActiveSheet.Paste
ActiveWindow.SelectedSheets.Visible = False
Thanks for your time