When the shell command executes, the DOS window pops up, command executes, then DOS window closes before I can read what was in it. How can I leave the DOS window open until I close it with ctrl+c or other?
Printable View
When the shell command executes, the DOS window pops up, command executes, then DOS window closes before I can read what was in it. How can I leave the DOS window open until I close it with ctrl+c or other?
try this: make a .bat file which includes only the call to your dos program. Then shell to the .bat file
Hope this help
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
Right click on DOS program, go to properties and uncheck 'Close Window on exit'
Iouri Boutchkine
[email protected]
I am not running from a DOS icon or shortcut. The DOS app launches within my VB app so I can't set the checkbox.
DOes not matter. Find this DOS command and set the property.
Iouri Boutchkine
[email protected]
The following opens a new DOS window and issues the DIR command.
The window gets the focus, and you can close it when you wish.
Shell "c:\windows\command.com /K dir", vbNormalFocus