how to get the cmd window to close in VBA??
On Thu, 17 Jun 2004 03:50:41 -0500, Simon Lloyd
wrote:
I have written some code to open a program on a PC when a certain
condition exists, this works fine and does the job, however the cmd
window is still left open after this operation anyone know how to close
it in VBA???
Here's the code i use.....
shell("cmd /k C:\notes\notes.exe")
where notes is the program to open.
Simon
Remove the "/k" - that specifically tells cmd.exe to run the program you
specify and then remain open. In fact, you should really remove "cmd"
entirely and just do
shell "c:\notes\notes.exe"
--
auric underscore underscore at hotmail dot com
*****
If you only face forward, there is something you will miss seeing.
-- Vash the Stampede (Trigun)
|