how to call system command from VB?

J

jim

Hi all,

I have a very old utility which is DOS command, I want to call it from
VB code. How can I call this from VB? Anyone can help I very
appreciate.
 
T

Tom Shelton

Hi all,

I have a very old utility which is DOS command, I want to call it from
VB code. How can I call this from VB? Anyone can help I very
appreciate.

You should be able to use the shell command, or
System.Diagnostics.Process.
 
J

jim

when I use ShellId = Shell(CommandLine, vbNormalFocus)

I got compile error: expected variable or procedure, not module
 
J

jim

Thanks all very much. I know the problem to use shell. because there is
another module that someone define the name is Shell, so I can't use
shell command.

Thanks everyone again.
 
H

Herfried K. Wagner [MVP]

jim said:
I know the problem to use shell. because there is
another module that someone define the name is Shell, so I can't use
shell command.

Simply use 'Interaction.Shell'...
 

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

Similar Threads


Top