How Do I Load A ComboBox RowSource From The Results Of Another ComboBox

M

Minitman

Greetings

I have 2 ComboBoxes on a UserForm called CBox1 and CBox2. CBox1 works
fine. It looks to get 1 of five names. I have five named ranges with
the same names as the five choices that CBox1 can choose from. I need
for CBox2 to load the named range with the same name as CBox1's
choice.

I tried but it would not accept my entry into the RowSource property.

Is this even possible?

Any help would be most appreciated.

TIA

-Minitman
 
C

Chip Pearson

Try something like

Private Sub Combo1_Change()
Dim Rng As Range
With ComboBox1
.Clear
For Each Rng In Range(.List(.ListIndex))
ComboBox2.AddItem Rng.Text
Next Rng
End With
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
M

Minitman

Hey Bob,

Yes it does!!! Thanks,

And thanks also to Chip for his contribution, it also works - Thanks
Chip.

Please, keep up the good work - Both of you.

-Minitman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top