Excel 2007 - control chart refresh

meos

New Member
Joined
Mar 19, 2011
Messages
1
I have a workbook where one sheet has a series of 3 charts that get their data from 9 sheets, each of which is the result of a database query. I control the query in VBA code and use code like:

str = "Select * from table where conditions = good..."
Sheet1.QueryTables(1).CommandText = str
Sheet1.QueryTables(1).Refresh

ditto for Sheet2, 3, 4, 5...

each Refresh causes all the charts to blink as each refresh occurs. Since the time for the query to execute can take a couple of seconds, more on a slow line, this is quite annoying.

What I would like to do is hide the charts or hide the sheet until all the refreshes of the data are done, then do one refresh of the charts. I have tried setting the chart sheet to not be visible, then wait till the refresh completes and then set it visible and made Active...which simply delays when the 9 blinks occur.

Any ideas?

Mike
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,215,200
Messages
6,123,612
Members
449,109
Latest member
Sebas8956

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top