Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Refreshing a pivot table Neville Bailey[_2_] Excel Discussion (Misc queries) 1 November 16th 08 05:47 PM
Pivot table refreshing Daniel Excel Discussion (Misc queries) 5 July 12th 07 05:02 PM
When refreshing pivot tables my pivot table chart type changes hannah220507 Excel Discussion (Misc queries) 1 May 22nd 07 02:57 PM
Refreshing a pivot table Louise Excel Discussion (Misc queries) 2 May 23rd 05 01:40 PM
OfficeXP "Cannot open pivot table source file" when refreshing pivot table Luc Alquier Excel Programming 2 December 9th 03 11:11 PM


All times are GMT +1. The time now is 08:44 AM.

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

About Us

"It's about Microsoft Excel"