Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Index out of range

$
0
0
Hi,

I'm having error message :Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

I'm trying to get the value in datagridview from combobox.

this is my code:

  Dim colcount As Integer
        colcount = srchtbl.ColumnCount
        MsgBox(colcount)
        For j = 0 To colcount
            If (Trim(ComboBox1.Text) = Trim(srchtbl.Item(1, j).Value)) Then
                MsgBox("value found", 0)
            End If
        Next


Viewing all articles
Browse latest Browse all 51036

Trending Articles



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