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?

4
Contributors
3
Replies
4
Views
13 Years
Discussion Span
Last Post by HokSun

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")

Hi, all

Have you ever try it with windows api.

Regard

Hok Sun

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.