Trying to set the value of a filter a pivot table (SSAS OLAP-cube data-source) by program, I started macro-recorder and then selected from the filter drop-down manually. Manual selection from the drop-down list of about 9000 entries, refreshed the pivot with the correct data in less than 1 second.
Running exactly the self same macro hangs (or takes longer than 10 minutes when I esc-aped out; at that point I get Error 7 Out of Memory, incidently!)
Complete macro-code:
Sub Macro1()
ActiveSheet.PivotTables("PivotTable3").PivotFields( _
"[Dw Worked Weeks].[Filter BSN].[Filter BSN]").ClearAllFilters
ActiveSheet.PivotTables("PivotTable3").PivotFields( _
"[Dw Worked Weeks].[Filter BSN].[Filter BSN]").CurrentPageName = _
"[Dw Worked Weeks].[Filter BSN].&[095990288]"
End Sub
I tried setting .ManualUpdate and .EnableItemSelection, but neither helped in any True/False combination. Any ideas please?
Bookmarks