ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pausing while retrieving data (https://www.excelbanter.com/excel-programming/301224-pausing-while-retrieving-data.html)

alex22

Pausing while retrieving data
 
hi, everyone!


I have a query retrieving data from a remote database. The proces
takes some time. I have a code that defines the query criteria and the
manipulating the retrieved data.

What I'm not sure is if the execution of all commands is suspende
BEFORE all data are retrieved. It seems like some actions are take
while Excel is still loading the data.

Is there any way to pause before proceeding or in any way make sure n
action is taken before query finished refreshing?


Thanks!

--
Message posted from http://www.ExcelForum.com


GJones

Pausing while retrieving data
 
Hi Alex;

Unless you use code to tell it differently Excel executes
code step by step or non-Asynchronously. Unless you use
the Do Events call it is very unlikely the next command is
happening.

Thanks,

Greg


-----Original Message-----
hi, everyone!


I have a query retrieving data from a remote database.

The process
takes some time. I have a code that defines the query

criteria and then
manipulating the retrieved data.

What I'm not sure is if the execution of all commands is

suspended
BEFORE all data are retrieved. It seems like some actions

are taken
while Excel is still loading the data.

Is there any way to pause before proceeding or in any way

make sure no
action is taken before query finished refreshing?


Thanks!!


---
Message posted from http://www.ExcelForum.com/

.


alex22[_2_]

Pausing while retrieving data
 
Thanks for your reply!

However, my colleague is trying to solve exactly the same problem an
here's what he found:

He's got 2 queries in the same spreadsheet plus VBA code working wit
the data from the queries. It is very clear that while the querie
haven't finished retrieving data, VBA is not waiting but executing al
the commands! So the code finishes but the data is still bein
retrieved, which defeats the purpose of the code.

There's an option to "disable background refresh" but this doesn't hel
either.

Isn't there some sort of "Pause before blah-blah" or "Wait for x
time" command? I couldn't find anything of the sort but maybe you know


Thanks

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com