PC Review


Reply
Thread Tools Rate Thread

comboBoxes on a userform

 
 
LLoyd
Guest
Posts: n/a
 
      25th Feb 2008
Good Day.

I have done many comboBoxes on a userform, but now I now I need one comboBox
to look at another.

E.G
comboBox 1 has the district listed
comboBox 2 has the Facility listed
When you choice a district in comboBox1, then only the facilities belonging
to that district should show in comboBox 2.
On a sheet I do have the list of all the Districts in one col and list of
districts to Facility in two other col.

Thanks for your help

 
Reply With Quote
 
 
 
 
FSt1
Guest
Posts: n/a
 
      25th Feb 2008
hi
what you described sounds like cascading combos sometimes call dependent
combos. works something like this....
Private Sub ComboBox1_Change()
If Me.ComboBox1.Value = "1" Then
Me.ComboBox2.RowSource = "B5:B6"
Else
Me.ComboBox2.RowSource = "D56"
End If
End Sub
this sample code is for a two option combo box. if you have more options
then add more ifs for the additional options.

regards
FSt1

"LLoyd" wrote:

> Good Day.
>
> I have done many comboBoxes on a userform, but now I now I need one comboBox
> to look at another.
>
> E.G
> comboBox 1 has the district listed
> comboBox 2 has the Facility listed
> When you choice a district in comboBox1, then only the facilities belonging
> to that district should show in comboBox 2.
> On a sheet I do have the list of all the Districts in one col and list of
> districts to Facility in two other col.
>
> Thanks for your help
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modify code to Add ComboBoxes instaed of Textbox values on Userform ? Corey Microsoft Excel Programming 2 11th Jan 2007 04:59 PM
Linked ComboBoxes in UserForm Steve DB Microsoft Excel Discussion 11 18th Nov 2005 09:04 PM
Userform Comboboxes - need a quick how to.. =?Utf-8?B?Um9nZXJOWg==?= Microsoft Excel Programming 1 22nd Jul 2004 03:05 AM
Multiple ComboBoxes and TextBoxes on Userform =?Utf-8?B?UmljaCBK?= Microsoft Excel Programming 6 27th Jan 2004 07:51 PM
Several comboBoxes on a Userform mor.mic Microsoft Excel Programming 3 1st Oct 2003 09:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:32 PM.