Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refreshing Pivot table
Hi All.
I have a workbook with 6 sheets. Each sheet has a pivot table. I have a button on another form that runs a query and populates yet another sheet that each pivot table pulls from. I want the pivot tables to refresh after the query is run. I loop through all the sheets and then loop through all pivot tables and call RefreshTable on each. I've also tried Refresh. What happens is that first 2 sheets seems to refresh but the others don't. Also, if there are no records when the pivot tables refresh they reduce down to just the rows and column (which is normal) but when I refresh again and there are records, the filter I put on the page field isn't retained - this may be normal. If I reapply the filter I get a message that it cannot overlap an existing pivot table. There are a few cells in the area that used to be populated by a pivot table but no longer have any values there. I have to delete the rows and then apply the filter. I hope this makes sense. I wonder if I'm better off creating the pivot tables each time. Are there any examples of doing this in VBA? Thanks, Joe |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refreshing Pivot table
Post your code. If two fo the worksheets are updated then it weem tha the focus may be changing. I think you may be using Active Shee instead of specifying the sheet by names like Sheets("Sheet1"). What happens if you change the the two query table that get updated t two different query table doess the same thing happen? Do you have any Event Macro that may be causing the focus to change t a different sheet? Event macros could be causing some unexpecte results -- joe ----------------------------------------------------------------------- joel's Profile: 22 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=16406 [url="http://www.thecodecage.com"]Microsoft Office Help[/url |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Refreshing a pivot table | Excel Discussion (Misc queries) | |||
Pivot table refreshing | Excel Discussion (Misc queries) | |||
When refreshing pivot tables my pivot table chart type changes | Excel Discussion (Misc queries) | |||
Refreshing a pivot table | Excel Discussion (Misc queries) | |||
OfficeXP "Cannot open pivot table source file" when refreshing pivot table | Excel Programming |