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

I

Icy

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.
 
A

Aran Black

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
 
I

Icy

Thank you for your reply.
Yes, I do want to dynamically change the selection in the drop down list. So
if I have entire such as
Apple
Ace
Appointment
Bee
Bread
Beach
normally, on the combo box it will show all the selection to the user to
pick, I want user type A all the selection starting with B will be taken off
from the selection list. When user type B all the selection starting with A
will be taken off. so user can scroll up and down the list and choose what
they need in that range. I don't know whether this is possible for combo box
to do, or do you know if there any other way to accomplish this. Thanks again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top