Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Shell Synchornous?

"....By default, the Shell function runs other programs asynchronously. This
means that a program started with Shell might not finish executing before the
statements following the Shell function are executed...."

Is there a way to force the shell function to run in a synchronous manner?
I want to use the shell function to execute the dos command xcacls. The time
for the command to complete varies with every run and needs to be finished
before the next vba line executes. Therefore, a simple wait XXX seconds
routine will not work for me.

Rich

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Shell Synchornous?

Hi Rich

You can use ShellAndWait
See the vba example on this page
http://www.rondebruin.nl/csv.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Rwostbrock" wrote in message ...
"....By default, the Shell function runs other programs asynchronously. This
means that a program started with Shell might not finish executing before the
statements following the Shell function are executed...."

Is there a way to force the shell function to run in a synchronous manner?
I want to use the shell function to execute the dos command xcacls. The time
for the command to complete varies with every run and needs to be finished
before the next vba line executes. Therefore, a simple wait XXX seconds
routine will not work for me.

Rich



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Shell Synchornous?

PERFECT!

Thanks

"Ron de Bruin" wrote:

Hi Rich

You can use ShellAndWait
See the vba example on this page
http://www.rondebruin.nl/csv.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Rwostbrock" wrote in message ...
"....By default, the Shell function runs other programs asynchronously. This
means that a program started with Shell might not finish executing before the
statements following the Shell function are executed...."

Is there a way to force the shell function to run in a synchronous manner?
I want to use the shell function to execute the dos command xcacls. The time
for the command to complete varies with every run and needs to be finished
before the next vba line executes. Therefore, a simple wait XXX seconds
routine will not work for me.

Rich




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell question ? Mathew Excel Programming 1 April 8th 05 02:09 PM
Shell Stuart[_20_] Excel Programming 1 February 17th 05 01:50 AM
VBE COM Add-in Shell R Avery Excel Programming 1 August 12th 04 02:55 PM
Shell Joseph[_12_] Excel Programming 1 February 1st 04 04:33 AM
shell out of excel into another app toothfish__[_2_] Excel Programming 0 January 19th 04 03:02 PM


All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"