Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

Proper Loop for Listview Column Scan?Error: InvalidArgument=Value of '0'

$
0
0
I have this code that scan all IP in SubItems(4) but im receiving this error
Quote:

System.ArgumentOutOfRangeException: InvalidArgument=Value of '0' is not valid for 'index'.
Parameter name: index
Code:

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles connectioncheck.Tick
        'ipchecker
Dim n As Integer = 0
        Do Until n = clientView.Items.Count
            Try
                client.SendMessage(clientView.Items(n).SubItems(4).Text, 6602, "0")
            Catch ex As Exception
                MsgBox(ex.Message)
                clientView.Items(n).Remove()
            End Try
            n = n + 1
        Loop

End Sub


Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>