I think a EXCEL VBA to complete, but haven't done such a thing I graduate from high school,
Baidu made a for a while, but since I have been running show 424
no object
Private Sub CommandButton2_Click ()
Dim HangShu As Integer
HangShu=Sheets (" sheet1 ".) [r]. B1 CurrentRegion. Rows. Count
For I=1 To HangShu
If My.Computer.Net work. Ping (Sheet1. Cells (I, 2)) Then
Sheet1. Cells (I, 3)=1
The Else
Sheet1. Cells (I, 3)=2
End the If
Next
End Sub
This is the form below,
CodePudding user response:
This job is suitable for dry bat batch,CodePudding user response:
Sheets (" sheet1 ".) (B1)First saw that said "cell",
But just try once, feasible; Only this can only be "constants",
My.Computer.Net work. Ping (Sheet1. Cells (I, 2))
This is "My" what the hell......
Your code to run error must be raised here,
Do you want to Ping an url, want to find a can "Ping function modules of the target host",
Or use "pipeline operation" call Ping. Exe to operation, the processing, the results of its judgment "pass" or "no",
Not all functions, there are "system", there are some things, can only be "yourself",
Equivalent to say, the system only provides some basic raw materials, components, integrated block, etc., to do a "products (finished)," you have to your own design, assembly,