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
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