Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there are question in there ?
NickHK "RRohl" wrote in message ... Dim arrExcelValues() Set objExcel = CreateObject("Excel.Application") objExcel.Visible = True Set objWorkbook = objExcel.Workbooks.Open("C:Serverlist.xls") Set objWorksheet = objWorkbook.Worksheets(1) intRow = 2 objExcel.Cells(1, 1).Value = "Server Name" objExcel.Cells(1, 2).Value = "Results" i = 2 x = 1 Do Until objExcel.Cells(i, 1).Value = "" ReDim Preserve arrExcelValues(x) arrExcelValues(x) = objExcel.Cells(i, 1).Value Set WshShell = WScript.CreateObject("WScript.Shell") Ping = WshShell.Run("ping -n 1 " & arrExcelValues(x), 0, True) objExcel.Cells(intRow, 1).Value = arrExcelValues(x) i = i + 1 x = x + 1 if ping = 0 then objExcel.Cells(intRow, 2).Value = "On Line" else objExcel.Cells(intRow, 2).Value = "NO PING" end if intRow = intRow + 1 Loop objExcel.Range("A1:B1").Select objExcel.Selection.Interior.ColorIndex = 5 objExcel.Selection.Font.ColorIndex = 6 objExcel.Selection.Font.Bold = True objExcel.Cells.EntireColumn.AutoFit -- RRohl ------------------------------------------------------------------------ RRohl's Profile: http://www.excelforum.com/member.php...o&userid=36718 View this thread: http://www.excelforum.com/showthread...hreadid=566137 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PING within Excel Cell | Excel Worksheet Functions | |||
Excel Ping Command..via web... | Excel Programming | |||
Ping Server Excel Macro | Excel Programming | |||
Ping results into Excel | Excel Programming | |||
ping in excel | Excel Programming |