Filiter and Limit selection in Combo box / List Box in the UserFor

Filiter and Limit selection in Combo box / List Box in the UserFor

Post by SWN5 » Sat, 03 Nov 2007 23:38:01


I am having a problem to limit the selection display in the Combo box / List
Box. I would like the Combo Box to display a list of result in the drop down
list as user enter value. I have a data base with 2000 entry, it will be
very helpful to limit the record display in the dropdown list.

Example if user type A in the Combo box the drop list will show
Apple
Age
Adam
Ace
Appointment

if user type Ap then only Apple & Appointment with show on the drop down
list.

Kind of like filter, but the result on the drop down list will change as the
input value changes. Could some one please help. Thank you so much.
 
 
 

Filiter and Limit selection in Combo box / List Box in the UserFor

Post by QXJhbiBCbG » Sun, 04 Nov 2007 01:58:02

Hi Icy,

If you create a combobox control on sheet1 from the "Control Toolbox"
that control will provide the value "Apple" for you to choose if you type in
"a".
If you type in "ap" it still provides "Apple" for you to choose though if
you continue to type "Appo" then "Appointment" will appear as your option.

To dynamically change the entries (in the combobox) as you type (which is
what you want I think) then this is a different matter and maybe impossible.
Certainly it would require VBA code that populates your control dynamically
perhaps "fired" by the control's click event.

Sub poppcmbo()

Sheet1.ComboBox1.AddItem "Apple"
Sheet1.ComboBox1.AddItem "Age"
Sheet1.ComboBox1.AddItem "Adam"
Sheet1.ComboBox1.AddItem "Ace"
Sheet1.ComboBox1.AddItem "Appointment"

End Sub

Aran
--
It wasnt Jesus it was just a fella! God Bless America!