Excel VBA - Executing external programs in an excel macro

  • Thread starter Thread starter schumacker
  • Start date Start date
S

schumacker

Hi everyone:

I want to execute a dos cmd program from an excel macro. Which is the
way to do this?? Is there ary "ExecProgram" method in VB??

Example:

1. I want to execute the "ping" command from my excel macro.
2. The parameters for the ping command are the ip destination address
(abc.def.ghi.jkl).

If anyone knows how to do this, i will be very thankful.

Schumacker
 
Hi Schumacker,

You could shell the command, for example

RetVal = Shell("PING ""Yahoo.com""", 1)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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

Back
Top