We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Private Sub BackgroundWorker4_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker4.DoWork ifonline1 = 0 counter = 0 InitializeTimer() MsgBox("Attempting to power on " & strcomputer) Do Until ifonline1 = 1 Or counter >= 5 On Error Resume Next Dim Ping As New Net.NetworkInformation.Ping Dim PingOptions As New Net.NetworkInformation.PingOptions PingOptions.Ttl = 64 Dim PingReply As Net.NetworkInformation.PingReply = Ping.Send(strcomputer, 200) If PingReply.Status = Net.NetworkInformation.IPStatus.Success Then ifonline1 = 1 flag4 = "ON" Else ifonline1 = 0 flag4 = "OFF" End If Loop MsgBox(flag4) If ifonline1 = 1 Then Dim Host As Net.IPHostEntry = Net.Dns.GetHostEntry(strcomputer) Dim firstaddress As Net.IPAddress = Host.AddressList(0) ip = firstaddress.ToString End If flag1 = pc3 flag2 = ip flag3 = rownum worker.ReportProgress(prog1) Next End Sub Private Sub InitializeTimer() ' Run this procedure in an appropriate event. counter = 0 Timer1.Interval = 1000 Timer1.Enabled = True End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If counter >= 6 Then ' Exit loop code. Timer1.Enabled = False counter = 0 Else 'MsgBox(counter) ' Run your procedure here. ' Increment counter. counter = counter + 1 End If End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Determine Range to Select||5||62|
|Excel - Save a copy of work book||13||95|
|i want to change the ADD_CAR table available to true and import the data to RETURN table. now the problem is the data can import into RETURN table but the ADD_CAR table the available still not change||8||79|
|how to loop through and process two columns in excel||8||71|
Join the community of 500,000 technology professionals and ask your questions.