Tag: ping

连续ping通过VBScript从主机名列表更新到Exel

以下VBScript将显示从主机名列表到Excel电子表格的单个ping命令的状态: Set objExcel = CreateObject("Excel.Application") objExcel.Visible = True objExcel.Workbooks.Add intRow = 2 '# Define Labels objExcel.Cells(1, 1).Value = "Node" objExcel.Cells(1, 2).Value = "Status" '# Create file system object for reading the hosts from text file Set Fso = CreateObject("Scripting.FileSystemObject") Set InputFile = fso.OpenTextFile("MachineList.Txt") '# Loop thru the text file till the end Do While Not […]

excel vba ping电脑列表

我正在做一个项目。 我的目标是,从一个Excel列表中ping所有的计算机,但不知道为什么它不工作。 我在这个编程语言中是相当新的,我相信我错过了一些东西,因为我得到了错误信息:Object required 所以这里是我的代码 主要的: Sub pingall_Click() Dim c As Range c = Target.Name For Each c In Range("A1:N50") If (Left(c, 1) = "C" Or Left(c, 1) = "T") And IsNumeric(Right(c, 6)) And Len(c) = 7 Then c = sPing(c) If c = "timeout" Then MsgBox "timeout" ElseIf c < 16 And c > […]