Ok so for a while now ive had a program that pings about 15 computers on my network, but the way i have it is pretty messy, id like to somehow make the code a bit cleaner.

so what i have is something like this

vb Code:
  1. Private Sub Ping()
  2.         If My.Settings.server1ip <> String.Empty Then
  3.             Dim MyPing As New System.Net.NetworkInformation.Ping
  4.             Dim MyPingResult As System.Net.NetworkInformation.PingReply = MyPing.Send(My.Settings.server1ip)
  5.             If MyPingResult.Status = Net.NetworkInformation.IPStatus.Success Then
  6.                 Me.txtServer1Status.ForeColor = Color.Green
  7.                 Me.txtServer1Status.Text = ("Online")
  8.                 Me.txtServer1Reply.Text = (MyPingResult.RoundtripTime.ToString & " ms")
  9.                 If MyPingResult.RoundtripTime.ToString > 200 Then
  10.                     Me.txtServer1Reply.ForeColor = Color.Red
  11.                 Else
  12.                     If MyPingResult.RoundtripTime.ToString > 100 Then
  13.                         Me.txtServer1Status.ForeColor = Color.Orange
  14.                     End If
  15.                 End If
  16.             Else
  17.                 Me.txtServer1Status.ForeColor = Color.Red
  18.                 Me.txtServer1Status.Text = ("Failed")
  19.             End If
  20.         Else
  21.             Me.txtServer1Status.Text = ("No IP Entered")
  22.         End If
  23.     End Sub

so what i have is i copy that code 10 times and rename each sub to ping1 ping2 ping 3 etc. then i have a button with code like this

vb Code:
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.         Ping()
  3.         Ping2()
  4.         Ping3()
  5.         Ping4()
  6.         Ping5()
  7.         Ping6()
  8.         Ping7()
  9.  
  10.     End Sub

so that runs all my pings... now as you can see its a mess, and im sure its not the best way to go about it. so is there a way i can mold all that into 1 sub? i dont want to ping a range of computers, i want to ping a specific 15-20 ip's.

thanks in advance.