Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a workbook that has a bunch of pivottables that are based on an
Analysis Services cube. Each of the pivottables has a filter on it that limits the row data to one customer account. Once a week I go in an manually change the filter for the "Account ID" field so that the pivottables show the data in the pivots for a different account. All works great, except it is manual so I took some time and tried to write some VB code to automate the update for all pivots. To get started a recorded a macro. The macro has the following code: ActiveSheet.PivotTables("PivotTable1").PivotFields ( _ "[Account].[Account ID].[Account ID]").ClearAllFilters ActiveSheet.PivotTables("PivotTable1").PivotFields ( _ "[Account].[Account ID].[Account ID]").PivotFilters.Add Type:=xlCaptionEquals _ , Value1:="194108" Here's what I don't understand, when I run the macro, I get an "Out of Memory" error when it attempts to "ClearAllFields". I can make the change manually and it updates in about 5 seconds, but when I try to make the change in code, it fails. Any advice? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PivotFilters in pivottable | Excel Programming | |||
Error Using the PivotFilters function | Excel Programming | |||
Excel Throwing Circular Errors When No Errors Exist | Excel Worksheet Functions | |||
When updating a worksheet, how do I create a link updating the sa. | Excel Worksheet Functions | |||
Unresolved Errors in IF Statements - Errors do not show in results | Excel Worksheet Functions |