Command prompt?

M

Martin Seelhofer

Hi there

On NT, 2K, XP:

Shell "cmd.exe"

On 9x (not sure about this one):

Shell "command.com"


Cheers,
Martin
 
D

DOSHelp

Great! Now...how would I have it run behind the scenes, or
minimized? And then how would I get it to automatically
close?

Thanks

M
 
M

Mark Tangard

M,

You give it one of the 'windowstyle' arguments. (Check the help under
'Shell' for all the choices and syntax.) What you'd want here is either
vbMinimizedFocus or vbMinimizedNoFocus. Closing automatically I'm not
sure you can do from VBA, but it should be a simple matter (ooh, famous
last words?) to have the Shell statement run a batch file instead of a
single DOS command, and have that batch file end in 'EXIT'.
 
D

DOSHelp

Should've spaced a little more and I'da had it. Thanks for
your everyone's help.

M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top