Closed Thread
Results 1 to 3 of 3

Shell Synchornous?

  1. #1
    Rwostbrock
    Guest

    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. #2
    Ron de Bruin
    Guest

    Re: 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" <[email protected]> wrote in message news:[email protected]...
    > "....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. #3
    Rwostbrock
    Guest

    Re: 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" <[email protected]> wrote in message news:[email protected]...
    > > "....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
    > >

    >
    >
    >


Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1