Hello I want to add some names in a combobox (a few rows) but how to do that?
I have added a combobox1 control in internal designer and tried this code but that didn't work. What's wrong with this code?
What to do when I want to update this in case Person variable changes?
The combobox remains empty.
Private Person1 As String = "Jimmy"
Private Person2 As String = "Tim"
Private Person3 As String = "Eric"
Private Person4 As String = "Joe"
Private Person5 As String = "Simon"
ComboBox1.Items.Clear
ComboBox1.Items.AddAll(Array As String(Person1, Person2, Person3, Person4, person5))
I have added a combobox1 control in internal designer and tried this code but that didn't work. What's wrong with this code?
What to do when I want to update this in case Person variable changes?
The combobox remains empty.
Private Person1 As String = "Jimmy"
Private Person2 As String = "Tim"
Private Person3 As String = "Eric"
Private Person4 As String = "Joe"
Private Person5 As String = "Simon"
ComboBox1.Items.Clear
ComboBox1.Items.AddAll(Array As String(Person1, Person2, Person3, Person4, person5))
Last edited: