I am trying to use a macro to filter a pivot table using the below code snippet. The code works, however the Slicer does not update to reflect the filter that was just applied. If I manually filter the pivot table, the slice does update.
I tried refresh/refresh all, manual update settings, and screen update settings. I am stuck. Any ideas?
ActiveSheet.PivotTables("PivotTable1").PivotFields( _
"[DataWithDuplicates_FULL].[PA_Select].[PA_Select]"). _
PivotFilters.Add Type:=xlCaptionContains, Value1:=SrchTrm