Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default VBA and PivotTable refresh

Folks,

I need to build a very complex report using on about 30,000 records using
Pivot Tables. I got everything to work UNTIL I tried selecting (and
de-selecting) items within a field. Each time a field is set the Pivot
Table recomputes. Depending on the month selected by the user, I need to
set 12 items in the MONTH field to True (include) or False (don't include).
I don't want the Pivot Table to refresh 12 times as it takes about 10
seconds each time!

I have already tried .Pivot.EnableRefresh = False - that only turns off
manual refresh. I tried placing multiple items in a .PivotItems statement
(e.g. .PivotItems("10/1/2007", "11/1/2007").Visible = True), but only a
single argument is allowed.

Bummer! I am was so close to creating something really cool. What am I
overlooking here? Anybody have any ideas?

Thanks for your help,

Allan P. London, CPA




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default VBA and PivotTable refresh

Turn off ManualUpdate at the start of the code, and on at the end:

ActiveSheet.PivotTables(1).ManualUpdate = True
'your code
ActiveSheet.PivotTables(1).ManualUpdate = False


alondon wrote:
Folks,

I need to build a very complex report using on about 30,000 records using
Pivot Tables. I got everything to work UNTIL I tried selecting (and
de-selecting) items within a field. Each time a field is set the Pivot
Table recomputes. Depending on the month selected by the user, I need to
set 12 items in the MONTH field to True (include) or False (don't include).
I don't want the Pivot Table to refresh 12 times as it takes about 10
seconds each time!

I have already tried .Pivot.EnableRefresh = False - that only turns off
manual refresh. I tried placing multiple items in a .PivotItems statement
(e.g. .PivotItems("10/1/2007", "11/1/2007").Visible = True), but only a
single argument is allowed.

Bummer! I am was so close to creating something really cool. What am I
overlooking here? Anybody have any ideas?

Thanks for your help,

Allan P. London, CPA






--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

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
Pivottable refresh in shared workbook mkeener Excel Discussion (Misc queries) 2 January 14th 09 04:17 PM
How to refresh a Scenario PivotTable Report? Gerry Excel Discussion (Misc queries) 9 June 1st 08 08:12 PM
Refresh and PivotTable with Analysis Services Marco Russo Excel Worksheet Functions 2 August 8th 07 04:20 PM
PivotTable After Refresh Event??? Edd Excel Programming 0 October 6th 04 12:42 PM
refresh in pivottable Kanan Excel Programming 3 March 5th 04 01:11 AM


All times are GMT +1. The time now is 09:19 AM.

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"