Make The Selections Available In ComboBox2 Dependant On The Value Of ComboBox1
Posted on 2013-01-19
I have a series of combo boxes. I want to use VBA to change the values available in the second combo box, based on what was chosen in the first one.
I think the following code, (even though its non-working), shows what I am wanting to do:
Private Sub CboBox1_AfterUpdate()
If Me.CboBox1 = "Choice1" Then
Me.CboBox2.RowSource = "Result1";"Result2";"Result3"
ElseIf Me.CboBox1 = "Choice2" Then
Me.CboBox2.RowSource = "Result4";"Result5";"Result6"
I have seen examples of combo boxes that do something similiar to what I am wanting to do, but they all used select statements - Is there a way to control the options available in a combo box purely with VBA?