Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Get errors when updating PivotFilters

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PivotFilters in pivottable amit Excel Programming 0 October 15th 08 03:24 AM
Error Using the PivotFilters function jmlozares Excel Programming 2 July 21st 08 10:15 AM
Excel Throwing Circular Errors When No Errors Exist MDW Excel Worksheet Functions 1 August 10th 06 02:15 PM
When updating a worksheet, how do I create a link updating the sa. Phlashh Excel Worksheet Functions 9 January 27th 05 06:05 PM
Unresolved Errors in IF Statements - Errors do not show in results Markthepain Excel Worksheet Functions 2 December 3rd 04 08:49 AM


All times are GMT +1. The time now is 12:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"