Link to home
Start Free TrialLog in
Avatar of chrisryhal
chrisryhal

asked on

Declare Combobox Collection????

How can I declare a "collection" for a combobox?  

Example:
     Dim JobsCollection As String = Handwork,Routing,Engineering,CADCAM

Only reason I ask, if because I have two comboboxes on my Windows App form.  I will need to fill combobox2 based on the value of what combobox1 is
Avatar of chrisryhal
chrisryhal

ASKER

Oh, I forgot to mention.

Allong with that, here is what I am trying to achieve:

If ComboBox1.SelectedItem = "Jobs" Then
      ComboBox2.Collection = STRING
What do you mean by collection because you can just do this

 Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        ComboBox2.Items.Add(ComboBox1.SelectedItem)
    End Sub
the above code will add the item you have selected in combobox1 to combobox2
or if you only want to add after the user pressed on ok button, then just put that code in the button click event
Here is what I am trying to achieve more in detail.

If user chooses "Part" in Combo1 then Combo2 fills with:
        Raw Material
        Dies
        IT Equipment
        Machining Equipment

If user chooses "Customer" in Combo1 then Combo2 fills with:
        Stanley
        Black and Decker
        J&L Tooling
        Snap-On

And so on
SOLUTION
Avatar of Koala119
Koala119

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
These strings you want to put in combobox2 where do they come from ?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial