View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default Sending "Enter" command to cmd.exe app...

If you add Exit as the last line of your batch file, does it close the
window?

--
Jim Rech
Excel MVP
"Trevor" wrote in message
...
| Hi all,
|
| I have written ( with much help from the message board ) a
| macro in excel that opens a .BAT file, runs it, then
| continues with the import of a text file. However, when
| all is done, there is still a cmd.exe window left open in
| the background waiting for "Press any key to
| continue...". When any key is pressed within that app,
| the app window is closed. Is there a way to send a
| command from the excel macro to that app to close it? Any
| help is much appreciated.
|
| Thanks,
|
| Trevor