I Am A Vb On Excell User, I Am Trying To Make A Macro In Visual Basic But I Do Not Know How To Run A Msdos Comand Over Vb
In Specific I Want To Excecute A "ping" Command Over A Macro That Help Me To Se If A Computer Is On Line And Record On A Excell Worksheet, omeone Can Help Me How To Do It?

I Am A Vb On Excell User, I Am Trying To Make A Macro In Visual Basic But I Do Not Know How To Run A Msdos Comand Over Vb
In Specific I Want To Excecute A "ping" Command Over A Macro That Help Me To Se If A Computer Is On Line And Record On A Excell Worksheet, ⿳omeone Can Help Me How To Do It?

Although I don't use VB but rather PowerBasic for windows, maybe this will be of some use (hopefully).

Example:
Assume you have written or have a batch file.
use:

SHELL ENVIRON$("COMSPEC") + " /c " + batfilename$

Probably would work with commands too.

Actually, if your using VB6, I'm pretty sure you could just do Shell("C:\path\to\ping.ext localhost")

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.