How do I pause until a number of Queries are refreshed?

D

Duncan Hutchinson

I have developed a (very inneficient!) excel spreadsheet which takes a value
from a specific cell and refreshes a number of SQL queries, enters some of
the information received into a worksheet and I can then print the result.

I want to be able to go through a list of values somewhere in the
spreadsheet, refresh all, then print and go onto the next value and repeat.
I have done this by recording a macro, but the results are printed before
the refresh is completed. I would like to put a 'wait until all refreshes
are complete' command into the loop. Any ideas????

Thanks
Duncan
 
D

Don

Have you looked at the wait method? It only allows a time
to wait entered.

You may allso want to look at the selectionchange event.

Don
 
D

Dick Kusleika

Duncan

Check out the Background argument to the Refresh method. Set it to False to
essentially pause macro execution until the refresh is completed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top