drcyrus3d
asked on
I get an error when i try to add new item to a listbox.
Hy
This is a part from my code:
For ci = 0 To ListBox2.Items.Count
If TextBox7.Text = ListBox2.Items.Item(ci) Then
GoTo Same_ID
End If
Next
ListBox2.Items.Add(TextBox 7.Text)
when it arrives at : ListBox2.Items.Add(TextBox 7.Text)
it gives me this error:
An unhandled exception of type 'System.ArgumentOutOfRange Exception' occurred in system.windows.forms.dll
Additional information: Specified argument was out of the range of valid values.
What should i do??
This is a part from my code:
For ci = 0 To ListBox2.Items.Count
If TextBox7.Text = ListBox2.Items.Item(ci) Then
GoTo Same_ID
End If
Next
ListBox2.Items.Add(TextBox
when it arrives at : ListBox2.Items.Add(TextBox
it gives me this error:
An unhandled exception of type 'System.ArgumentOutOfRange
Additional information: Specified argument was out of the range of valid values.
What should i do??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER