ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Synchronous execution using shell function (https://www.excelbanter.com/excel-programming/398224-synchronous-execution-using-shell-function.html)

Chris

Synchronous execution using shell function
 
Hi,

I can start my external application using the shell command and after about
15s it generates a txt file which I then want to process in Excel. How do I
make Excel wait for the application to terminate before processes the code
after the shell command.

Any advice is greatly appreciated.

Thanks
Chris

Halim

Synchronous execution using shell function
 
use :
If Application.Wait(Now + TimeValue("0:00:02")) Then
'your code here
End If
--
Regards,

Halim



"Chris" wrote:

Hi,

I can start my external application using the shell command and after about
15s it generates a txt file which I then want to process in Excel. How do I
make Excel wait for the application to terminate before processes the code
after the shell command.

Any advice is greatly appreciated.

Thanks
Chris


Stefi

Synchronous execution using shell function
 
From Tom Ogilvy:

http://support.microsoft.com/?id=214248
XL2000: How to Force Macro Code to Wait for Outside Procedure

http://support.microsoft.com/?id=129796
HOWTO: 32-Bit App Can Determine When a Shelled Process Ends

http://support.microsoft.com/?id=147392
XL: How to Force Macro Code to Wait for Outside Procedure

Regards,
Stefi


€˛Chris€¯ ezt Ć*rta:

Hi,

I can start my external application using the shell command and after about
15s it generates a txt file which I then want to process in Excel. How do I
make Excel wait for the application to terminate before processes the code
after the shell command.

Any advice is greatly appreciated.

Thanks
Chris



All times are GMT +1. The time now is 01:27 PM.

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