I have a little problem with my code in Visual Basic. It is quite simple but I'm very new to this language.
In Visual Basic, I want to add new items in my combo box like this:
ComboBox1.Items.Add(array(1))
When the program executes the code, I suppose that I make a new ComboBox
item in a specific position with the attribute .Text
, but I want to access and add some data in the attribute .Value
at the same time. The code is inside a loop.
My Code:
While src.Peek() <> -1
cadena = src.ReadLine()
intermitja = Split(cadena, "/")
ComboBox1.Items.Add(intermitja(1))
' I tried this...
' ComboBox1.Items(ComboBox1.Items.Count).value = (intermitja(0))
End While