COMBO BOX list changes depending on another combo box

SQUIDD

Well-known Member
Hi All

Before i get to involved with mu approach.
Is this even possible.

In a userform i have a combo box linked to a named range in a sheet. 8 options.

I then want another combo box that displays a variable named range dependent on the previous combobox

for instance

combo box 1 has the 8 options lets call them a,b,c,d,e,f,g,h

if c is in combo box 1, combobox 2 shows the named range ALLTHEC
if d is in combo box 1, combobox 2 shows the named range ALLTHED

hope this makes sense, otherwise i need to change my entire approach.

all comments welcome, even if its not possible.

Dave
 

jasonb75

Well-known Member
You should be able to do it with something like
Code:
Select Case ComboBox1.Value
    Case a
         ComboBox2.List = Range("ALLTHEA").Value
    Case b
         ComboBox2.List = Range("ALLTHEB").Value
'etc.
End Select
 
Last edited:

Akuini

Well-known Member
Maybe this:
It's better if you have the named range list in combobox1, then:
Code:
Private Sub ComboBox1_Change()
ComboBox2.List = Range(ComboBox1.Value).Value
End Sub
 
Last edited:

Some videos you may like

This Week's Hot Topics

Top