Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default How Do I Load A ComboBox RowSource From The Results Of Another ComboBox

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How Do I Load A ComboBox RowSource From The Results Of Another ComboBox

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



"Minitman" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default How Do I Load A ComboBox RowSource From The Results Of Another ComboBox

Does this do it for you?

CBox2.RowSource = Range(CBox1.Value).Address

--

HTH

RP

"Minitman" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default How Do I Load A ComboBox RowSource From The Results Of Another ComboBox

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



On Tue, 26 Oct 2004 19:33:52 +0100, "Bob Phillips"
wrote:

Does this do it for you?

CBox2.RowSource = Range(CBox1.Value).Address


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
RowSource for Sheet ComboBox Minitman Excel Worksheet Functions 3 March 24th 08 09:43 PM
Create a RowSource Depending on ComboBox Choice Blobbies Excel Discussion (Misc queries) 3 November 18th 07 01:22 AM
How Do I Load A ComboBox On A UserForm Minitman[_4_] Excel Programming 4 October 26th 04 07:40 PM
combobox rowsource Newbie Excel Programming 1 September 8th 04 12:21 PM
ComboBox RowSource --- can I use a userform OWC10 spreadsheet range? Dean Frazier Excel Programming 0 February 11th 04 07:16 PM


All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"