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)
 
Back
Top