![]() |
List boxes/combo boxes
I'm having trouble using lists and combo boxes. Basically,
I'm new at using them. I want a combo box/lists to have 3 values I can select, Yes/No/Pending. I was thinking maybe lists/combos work like validation, where you can store the value in the control or on the worksheet, but can't get either way to work. I've tried tinkering with row source and column source but no luck. Can anyone help me please.... Thanks |
List boxes/combo boxes
If it's a combi-box on a sheet, then the index-value for the values in the input-range is stored in the cell given as "cell-link"
So, suppose you have the input-range A1001:A1003 where you have respectively the values Yes, No and Pending, and the cell-link B1001. Thus, when selecting Yes, you get 1 in B1001, when selecting No you get 2 in B1001 and when selecting Pending you get 3 there So, you may easily refer the cell-link B1001 in your VBA modules Or use the value displayed in the combo-box the following way v_combodisplay=range(my_sheet & "!A" & cstr(range(my_sheet & "!B1001).value + 1000)).valu Or is it that you mean to use a combo-box in a form Then, that is a different thing Still, I believe this will help ----- Tibow wrote: ---- I'm having trouble using lists and combo boxes. Basically, I'm new at using them I want a combo box/lists to have 3 values I can select, Yes/No/Pending. I was thinking maybe lists/combos work like validation, where you can store the value in the control or on the worksheet, but can't get either way to work. I've tried tinkering with row source and column source but no luck Can anyone help me please.... Thank |
List boxes/combo boxes
Tribe,
Why not use optionbuttons, and a command button. Here is some code for the commandbuttonj, assuming control toolbox controls that will check which is set. Private Sub CommandButton1_Click() If OptionButton1.Value = True Then MsgBox "Yes" ElseIf OptionButton2.Value = True Then MsgBox "Pending" ElseIf OptionButton3.Value = True Then MsgBox "No" Else MsgBox "Nothing selected" End If End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Tibow" wrote in message ... I'm having trouble using lists and combo boxes. Basically, I'm new at using them. I want a combo box/lists to have 3 values I can select, Yes/No/Pending. I was thinking maybe lists/combos work like validation, where you can store the value in the control or on the worksheet, but can't get either way to work. I've tried tinkering with row source and column source but no luck. Can anyone help me please.... Thanks |
List boxes/combo boxes
for a combobox or listbox from the control toolbox toolbar,
on a worksheet in design mode (upper left button on the control toolbox toolbar depressed) right click on the box and select properties ListFillRange Enter Sheet3!B9:B11 as an example Get out of design mode on a Userform in the VBE, click on the box. Make sure the properties window is visible (F4) go to the rowsource property and enter Sheet3!B9:B11 Or you can populate it with code. On a userform Private Sub Userform_Initialize() With Combobox1 .AddItem "Yes" .AddItem "No" .AddItem "Pending" End With End Sub There is also a dropdown control on the Forms Toolbar. Beto gave you some information on that. Post back if you need more. -- Regards, Tom Ogilvy "Tibow" wrote in message ... I'm having trouble using lists and combo boxes. Basically, I'm new at using them. I want a combo box/lists to have 3 values I can select, Yes/No/Pending. I was thinking maybe lists/combos work like validation, where you can store the value in the control or on the worksheet, but can't get either way to work. I've tried tinkering with row source and column source but no luck. Can anyone help me please.... Thanks |
All times are GMT +1. The time now is 05:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com