0

Hi,
I want to fill data in my combo box using Add range method.

cboFirst.Items.Add("Sunday")
        cboFirst.Items.Add("Monday")
        cboFirst.Items.Add("Tuesday")
        cboFirst.Items.Add("Wednesday")
        cboFirst.Items.Add("Thursday")
        cboFirst.Items.Add("Friday")
        cboFirst.Items.Add("Saturday")

This is how im filling my combo with days. i want to do the Same but by using Add Range Method.
Please guide how,its urgent.

2
Contributors
2
Replies
7
Views
6 Years
Discussion Span
Last Post by Ehtesham Siddiq
0

Addrange method expects the array to be passed. Get all ur items in Array wich u want to add to combo. And pass the array in AddRange method...

Dim days() As String = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}
        ComboBox1.Items.AddRange(days)

Edited by Pgmer: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.