General Coding prob

Hi Guys,

I want to have some relationship between two Comboboxes.

If i select something from Combobox1 then the related dropdown should be visible in Combox2

I've done something but not sure it will work.

.....................................................................

Private Sub ComboBox1_Change()

If ComboBox1.Text = "YELLOW" Then

    ComboBox2.AddItem "SUN"

    ComboBox2.AddItem "APPLE"

    ComboBox2.AddItem "TREE"

   

ElseIf ComboBox1.Text = "RED" Then

    ComboBox2.AddItem "PENCIL"

    ComboBox2.AddItem "RUBBER"

    ComboBox2.AddItem "BALL"

End If

End Sub

Private Sub ComboBox2_Change()

End Sub

Private Sub UserForm_Initialize()

' List Here All the ADS Properties

    'ComboBox1.Clear

    ComboBox1.AddItem "YELLOW"

    ComboBox1.AddItem "RED"

    'ComboBox1.AddItem "GREEN"

   

    ComboBox2.Clear

    'ComboBox2.AddItem "SUN"

    'ComboBox2.AddItem "APPLE"

    'ComboBox2.AddItem "TREE"

 

End Sub

SolidworksApi macros