ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   shell to behave in synchronous manner (https://www.excelbanter.com/excel-programming/299769-shell-behave-synchronous-manner.html)

rraajjiibb

shell to behave in synchronous manner
 
My problem is this...


Since the

SHELL() availiable in VBA is asynchronus.


WHAT MY CODE IS DOING
--------------------------------
Actually a batch file is called through the Shell which in turn runs a
rsh on the unix machine and brings the file using the GET command.

Since it is diificult to predetermine the time taken to FTP ,in some
cases of file transfer the TEN SECONDS pause that I use in code is
exceeding thus causing trouble.

How to get around this problem???


.. Also I was thinking in the following direction to get around..


When we call SHELL(...) it returns a TASK ID assigned by the PC .Is
there a way to get the status of this TASK ID so that it can be
utilised to trigger the next line of the code ... instead of the timer
approach that I am currently using...


Thanks
:confused:


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


jaf

shell to behave in synchronous manner
 
Hi,
The MS way http://support.microsoft.com/default...NoWebContent=1

Since you mentioned FTP, you can also control IE and most all activity from VBA with the INET control including waiting for the "Done" command to be returned. Look for Microsoft Internet Control in VBA toolsreferences.



--
John
johnf 202 at hotmail dot com


"rraajjiibb " wrote in message ...
| My problem is this...
|
|
| Since the
|
| SHELL() availiable in VBA is asynchronus.
|
|
| WHAT MY CODE IS DOING
| --------------------------------
| Actually a batch file is called through the Shell which in turn runs a
| rsh on the unix machine and brings the file using the GET command.
|
| Since it is diificult to predetermine the time taken to FTP ,in some
| cases of file transfer the TEN SECONDS pause that I use in code is
| exceeding thus causing trouble.
|
| How to get around this problem???
|
|
| . Also I was thinking in the following direction to get around..
|
|
| When we call SHELL(...) it returns a TASK ID assigned by the PC .Is
| there a way to get the status of this TASK ID so that it can be
| utilised to trigger the next line of the code ... instead of the timer
| approach that I am currently using...
|
|
| Thanks
| :confused:
|
|
| ---
| Message posted from http://www.ExcelForum.com/
|


All times are GMT +1. The time now is 12:24 PM.

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