Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: testing2

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have two shell commands right after each other

    To make things simple lets say the old.txt is a static file that doesn’t change and is made already

    The first shell with the old.txt info when it runs it makes the old2.txt
    Shell "Command.com < old.txt" ‘This line runs and it makes old2.txt file
    Shell "Command.com < old2.txt"

    The Problem is excel run the command.com Then it runs the command.com But the old2.txt hasn’t been made yet


    What works kind of which I don’t want to use is putting this next couple statements between the two shell “command.com”
    Making a for aloop = 1 to 10000000
    Next a

    What I want to do is change the default of the shell function to have it wait until the shell “command.com” is finished
    I think I found on the msn some info on how to do it but I haven’t been able to find that info again
    Or maybe if was for a different language
    I tried what I remembered it said but I didn’t have any luck


    This is some text from help in excel
    Note 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.

    Thanks
    Barry

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    This should be in the Excel's questions forum... moving it there. Check out this page:

    http://www.scottandmichelle.net/scot...mv?codenum=069

    Its a very cool method.
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  3. #3
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Juan...I think he did post here after his test and it was answered
    Kind Regards,
    Ivan F Moala From the City of Sails

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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