MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Jan 14th, 2002, 01:33 PM   #1
LMF
Board Regular
 
Join Date: Mar 2002
Posts: 73
Default

Did you create the ComboBox using View|Toolbars|Forms?

Yes

If so, what is its input range and cell link?

Input range is just saying select list AAA or BBB to be appeared to the list box.

Does the input range of your combobox contain the list names AAA and BBB?

yeah!
LMF is offline   Reply With Quote
Old Jan 14th, 2002, 01:44 PM   #2
LMF
Board Regular
 
Join Date: Mar 2002
Posts: 73
Default

why is my post disappearing???

LMF is offline   Reply With Quote
Old Apr 14th, 2002, 11:12 AM   #3
LMF
Board Regular
 
Join Date: Mar 2002
Posts: 73
Default

ok, i got two ranges. named AAA and BBB

in cell A1 i got a number which is either 1 or 2 controlled by a combo box.

i have got a list box that will show list AAA when the number in cell A1 is 1, and show list BBB when the number in cell a1 is 2. how can i do that???

pls help
LMF is offline   Reply With Quote
Old Apr 14th, 2002, 11:27 AM   #4
LMF
Board Regular
 
Join Date: Mar 2002
Posts: 73
Default

pls remember that both range AAA and BBB are already using =offset() stuff, so...

pls help!
LMF is offline   Reply With Quote
Old Apr 14th, 2002, 11:41 AM   #5
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
Default

Quote:
On 2002-04-14 10:27, LMF wrote:
pls remember that both range AAA and BBB are already using =offset() stuff, so...

pls help!
Did you create the ComboBox using View|Toolbars|Forms?
If so, what is its input range and cell link?

Does the input range of your combobox contain the list names AAA and BBB?

Aladin
Aladin Akyurek is offline   Reply With Quote
Old Apr 14th, 2002, 11:51 AM   #6
Jay Petrulis
MrExcel MVP
 
Jay Petrulis's Avatar
 
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
Default

Hi,

Oops! I misread your post and started on this with option boxes on the userform. Please change the references to the cell A1 value.

Here, the option box determines which range appears in the ListBox.

Private Sub OptionButton1_Click()
Dim AAAItem, Alist
UserForm1.ListBox1.Clear
Set Alist = Sheets("Sheet1").Range("AAA")
For Each AAAItem In Alist
UserForm1.ListBox1.AddItem AAAItem
Next AAAItem
End Sub

Private Sub OptionButton2_Click()
Dim BBBItem, Blist
UserForm1.ListBox1.Clear
Set Blist = Sheets("Sheet1").Range("BBB")
For Each BBBItem In Blist
UserForm1.ListBox1.AddItem BBBItem
Next BBBItem
End Sub

This should get you started. Please post back if you need more details with your particular setup.

Bye,
Jay
Jay Petrulis is offline   Reply With Quote
Old Apr 15th, 2002, 02:18 PM   #7
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
Default

Quote:
On 2002-01-14 12:33, LMF wrote:
Did you create the ComboBox using View|Toolbars|Forms?

Yes

If so, what is its input range and cell link?

Input range is just saying select list AAA or BBB to be appeared to the list box.

Does the input range of your combobox contain the list names AAA and BBB?

yeah!
I wished I had more specific answers to the above questions. What follows will describe how to connect a combobox with a listbox.

We have a range (preferably in a worksheet called Admin), which is named CList, housing the following items:

AAA
BBB

Again, we have in Admin two ranges which are named AAA and BBB.

In a worksheet, named say Main, create a combobox, using the option View|Toolbars|Forms in B2, with CList as Input range and with B2 as Cell link.

Activate the option Insert|Define|Name.
Enter CurList as name in the Names in Worbook box.
Enter as formula in the Refers to box:

=INDIRECT(INDEX(CList,Admin!$B$2))

Activate OK.

Create a listbox in E2 in Main, using the option View|Toolbars|Forms, with CurList as Input range, with E2 as Cell link, and Selection type set to Single.

That's all.

Aladin
Aladin Akyurek is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On

Forum Jump


All times are GMT -4. The time now is 07:20 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes