Hi All,
I need a macro that will set certain pivot fields to (All). It all works like a charm as far as multiple items selection is disabled.
I either need macro to select all items or to disable the multiple selection and then select all.
The below code returns
run time 1004 app-def or object-def error at the row where i am trying to set to false, OLAP pivot so i cannot use all the features. Unless I find a solution to the below i will have to create slicers for each field and then make the macro to clear the slicer (set all visible).
Code:
Sub test()
Dim PT As PivotTable
Dim PF As PivotField
Set PT = ActiveSheet.PivotTables("Pivot2014")
Set PF = PT.PivotFields("Product")
PF.CubeField.EnableMultiplePageItems = False
End Sub
Please advise.
Thank you,
Kind regards,
Wries