0

Suppose I have items in combobox1
1) On button click event ,I want to copy all the items to combobox2 ? What is the coding for this?

4
Contributors
5
Replies
17
Views
8 Years
Discussion Span
Last Post by somu1205
0

You can't just do a cbo1.items = cbo2.items

You will need to do somthing like:

Dim Value as string 'Im not sure if this should be a string 

For each Value in cbo2.Items
   cbo1.items.add(Value)
Next
0
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim Item As String
        For Each Item In ComboBox1.Items
            With ComboBox2.Items
                .Add(Item)
            End With
        Next
    End Sub
0

Thx.Hey frnds tell me one thing is it posible to select multiple items from the Combobox.Is there any option??

0

you cannot select multiple item with combobox. You can use Listbox to select more than one items.

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.