Results 1 to 8 of 8

Open one command window and execute a series of commands from it.

Threaded View

  1. #1
    Registered User
    Join Date
    10-26-2004
    Location
    Portland, Oregon
    MS-Off Ver
    Excel in Windows
    Posts
    49

    Question Open one command window and execute a series of commands from it.

    I would like to open a command window/prompt (e.g. cmd.exe) and pass a single line command to it, wait for it to finish, and pass another command to it, continuing until done and then close the command window.

    Thinking about this, I guess I could build a multi-line command list and pass that to the command window and let it execute, continuing with the VBA once the commands are done executing. However, I would prefer my opening request because it would show how it can actually be done (reuse an open window).

    I've found a few things where a single command is run and the window is then closed but it doesn't get reused:
    http://www.pcreview.co.uk/forums/run...-t3895036.html
    http://support.microsoft.com/kb/129797

    I don't know if these are the right track for me or not. I've never had a need to run the command window and execute multiple command from inside Excel so this is a new learning opportunity for me.
    Last edited by Air_Cooled_Nut; 12-17-2013 at 06:29 PM. Reason: Solved.
    ~Toby

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to send multiple commands to an already open cmd window?
    By Marksman1973 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2013, 08:26 AM
  2. VBA code to open and execute files from different directories in Command window
    By AlexXYZ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-27-2012, 01:49 PM
  3. VBA code to open and execute files from different directories in Commend window
    By AlexXYZ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-27-2012, 01:52 AM
  4. Command line for open excel, insert a sheet, execute a macro, save file exit?
    By uschxc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2012, 12:28 PM
  5. command button to open a window
    By slmi1313 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-19-2008, 12:38 AM

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