ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Simulating a synchronous process (https://www.excelbanter.com/excel-programming/295872-simulating-synchronous-process.html)

Russ[_8_]

Simulating a synchronous process
 
Hello,

In my VBA macro, I'm running an external application
(Clear Access, in this case) to get the data I need.
Unfortunately, a Clear Access query runs asynchronously,
so that the macro continues to run.

However, I want Excel to wait for the results of the query
to come back before continuing on. (For example, what if
there are no records returned?)

How do I do this? Is there a way that Excel can
be "fooled" into waiting for another application to finish
before proceeding?

Any help would be greatly appreciated. Thanks,

-- Russ


Ivan F Moala[_3_]

Simulating a synchronous process
 
Hi Russ
This may be of use (Also includes a few other links)
http://www.xcelfiles.com/VBA_01.html#anchor_16

"Russ" wrote in message ...
Hello,

In my VBA macro, I'm running an external application
(Clear Access, in this case) to get the data I need.
Unfortunately, a Clear Access query runs asynchronously,
so that the macro continues to run.

However, I want Excel to wait for the results of the query
to come back before continuing on. (For example, what if
there are no records returned?)

How do I do this? Is there a way that Excel can
be "fooled" into waiting for another application to finish
before proceeding?

Any help would be greatly appreciated. Thanks,

-- Russ


Toby Erkson

Simulating a synchronous process
 
Ah, another excellent Excel web site for my favorites...good info!

Just one thing, change every spelling of "weather" to "whether" on your web site unless you are talking about the sun/wind/rain ;-) It's okay, if it weren't
for spell-checking features people would have a hard time believing I graduated high school 8-)
Toby Erkson
Oregon, USA

On 22 Apr 2004 04:57:33 -0700, (Ivan F Moala) wrote:

Hi Russ
This may be of use (Also includes a few other links)
http://www.xcelfiles.com/VBA_01.html#anchor_16

"Russ" wrote in message ...
Hello,

In my VBA macro, I'm running an external application
(Clear Access, in this case) to get the data I need.
Unfortunately, a Clear Access query runs asynchronously,
so that the macro continues to run.

However, I want Excel to wait for the results of the query
to come back before continuing on. (For example, what if
there are no records returned?)

How do I do this? Is there a way that Excel can
be "fooled" into waiting for another application to finish
before proceeding?

Any help would be greatly appreciated. Thanks,

-- Russ



Russ[_8_]

Simulating a synchronous process
 
Thanks Toby and Ivan! This is exacly what I'm looking for.

BTW, sorry to reply so late after your response <:-)

Thanks again,

- Russ



-----Original Message-----
Ah, another excellent Excel web site for my

favorites...good info!

Just one thing, change every spelling of "weather"

to "whether" on your web site unless you are talking about
the sun/wind/rain ;-) It's okay, if it weren't
for spell-checking features people would have a hard time

believing I graduated high school 8-)
Toby Erkson
Oregon, USA

On 22 Apr 2004 04:57:33 -0700, (Ivan

F Moala) wrote:

Hi Russ
This may be of use (Also includes a few other links)
http://www.xcelfiles.com/VBA_01.html#anchor_16

"Russ" wrote in

message ...
Hello,

In my VBA macro, I'm running an external application
(Clear Access, in this case) to get the data I need.
Unfortunately, a Clear Access query runs

asynchronously,
so that the macro continues to run.

However, I want Excel to wait for the results of the

query
to come back before continuing on. (For example, what

if
there are no records returned?)

How do I do this? Is there a way that Excel can
be "fooled" into waiting for another application to

finish
before proceeding?

Any help would be greatly appreciated. Thanks,

-- Russ


.



All times are GMT +1. The time now is 07:06 AM.

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