combobox out of range error

false74

Well-known member
Joined
Aug 4, 2010
Messages
76
Programming Experience
Beginner
VB.NET:
Protected WithEvents quarters As New ComboBox
    Private Sub addperiods()
        Dim quarterlist As New ArrayList
        quarterlist.Add("1st")
        quarterlist.Add("2nd")
        quarterlist.Add("3rd")
        quarterlist.Add("4th")
        quarters.DataSource = quarterlist
        quarters.SelectedIndex = 0
    End Sub

this causes a outofrange error. How? I added the arraylist into the combobox, I want it to select the first item.
 
Back
Top