Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All!
I want this in VBA that is Excel userform. Is there a way to display specific values in a "dropdown2" list based on selecting a value in "Dropdown1" list? For eg: Dropdown1 Values: 1,2,3 Dropdown2 Values: 1a,1b,1c,2a,2b,2c,3a,3b,3c So, If I select "1" in Dropdown1 then I want Dropdown2 to display 1a, 1b, 1c ONLY IF I select "2" in Dropdown1 then I want Dropdown2 to display 2a, 2b, 2c ONLY and so on... PLEASE HELP! Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sam,
In the change event of dropdown1 on your userform add the following code. Private Sub Dropdown1_Change() Me.Dropdown2.Clear Select Case Dropdown1 Case 1 Me.Dropdown2.AddItem "1a" Me.Dropdown2.AddItem "1b" Me.Dropdown2.AddItem "1c" Case 2 Me.Dropdown2.AddItem "2a" Me.Dropdown2.AddItem "2b" Me.Dropdown2.AddItem "2c" Case 3 Me.Dropdown2.AddItem "3a" Me.Dropdown2.AddItem "3b" Me.Dropdown2.AddItem "3c" Case Else 'do nothing End Select End Sub "sam" wrote: Hi All! I want this in VBA that is Excel userform. Is there a way to display specific values in a "dropdown2" list based on selecting a value in "Dropdown1" list? For eg: Dropdown1 Values: 1,2,3 Dropdown2 Values: 1a,1b,1c,2a,2b,2c,3a,3b,3c So, If I select "1" in Dropdown1 then I want Dropdown2 to display 1a, 1b, 1c ONLY IF I select "2" in Dropdown1 then I want Dropdown2 to display 2a, 2b, 2c ONLY and so on... PLEASE HELP! Thanks in advance |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sam,
see my follow-up response to your earlier post. -- jb "sam" wrote: Hi All! I want this in VBA that is Excel userform. Is there a way to display specific values in a "dropdown2" list based on selecting a value in "Dropdown1" list? For eg: Dropdown1 Values: 1,2,3 Dropdown2 Values: 1a,1b,1c,2a,2b,2c,3a,3b,3c So, If I select "1" in Dropdown1 then I want Dropdown2 to display 1a, 1b, 1c ONLY IF I select "2" in Dropdown1 then I want Dropdown2 to display 2a, 2b, 2c ONLY and so on... PLEASE HELP! Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating values based on selection from drop down box | Excel Discussion (Misc queries) | |||
Display specific values in Dropdown2 based on selection in Dropdow | Excel Programming | |||
Formatting cell based upon values w/in a selection | New Users to Excel | |||
How to limit columns that display based on selection of a dropdown value | Excel Worksheet Functions | |||
Selection based on values in a cell | Excel Programming |