Log in

View Full Version : Solved: DropDown Help



GaelicStar
06-22-2010, 01:42 AM
Hi All,

Im new to this forum so i would just like to say hello to everyone :)

I have a question that hopefully you may help me, or point me in the right direction. I have 2 dropdowns in a word template with multiple answers.

1.YES/NO
2. e.g. A,B,C,D.

What i want to do is this.

If i Click Yes on Dropdown 1, i will get A,B,C answers on dropdown 2.

If i Click No on Dropdown 1, then i get only get D on Dropdown 2

Hope that makes sense.

Thank you.

Tinbendr
06-23-2010, 03:08 AM
I'm assuming a userform.

What you're referring to is called a cascading dropdown.

Private Sub ComboBox1_Change()

Select Case ComboBox1
Case "YES"
With ComboBox2
.Clear
.AddItem "A"
.AddItem "B"
.AddItem "C"
End With
Case "NO"
With ComboBox2
.Clear
.AddItem "D"
End With
End Select

End Sub

Private Sub UserForm_Initialize()

With ComboBox1
.AddItem "YES"
.AddItem "NO"
End With


End Sub

GaelicStar
06-23-2010, 03:57 AM
Hi Tinbendr, :hi:

Yes a userform is correct. Thanks for the feedback. I will try this and let you know how i get on.

Thanks again