Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't know if your ping command is correct, but this is the basic
VBA code (untested) :- '---------------------------------------------------- Sub Ping() Dim IPaddress As String Dim CommandStr As String '-------------------------- IPaddress = Worksheets("Sheet1").Range("A1").Value CommandStr = "PING " & IPaddress & "~" rsp = Shell("cmd", 1) SendKeys CommandStr, True End Sub '-------------------------------------------------- (JStone0218) wrote in message ... I need help with the following code. I would like to ping an IP Address (x.x.x.x) that is referenced to cell A1 in Sheet1. Any help is appreciated. Sub Ping() Sheets.Add Shell ("cmd /c ping -n 10 -l 1024 x.x.x.x c:\ping.txt") Application.Wait Now + TimeSerial(0, 0, 15) End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Modifying Networkdays | Excel Discussion (Misc queries) | |||
Modifying A Formula | Excel Worksheet Functions | |||
help Modifying | Excel Worksheet Functions | |||
Help modifying code | Excel Programming | |||
Modifying Code that deletes a Row | Excel Programming |