VB to filter a list

  • Thread starter Thread starter CrankyLemming
  • Start date Start date
C

CrankyLemming

Hi

I have a worksheet containing a list of businesses, their addresses,
phone numbers, and so on, and also a column which specifies the type
of organisation: sports shop, cafeteria, phone shop, etc.

On a form I have a pair of comboboxes. I want ComboBox1 to act in the
same way as the data filter facility on the sheet. So in its default
state, ComboBox2 gives a list of every company. However, if the 'Phone
Shop' option was selected on CB1, then the available list in ComboBox2
would just be of those stores.

Please can anyone advise on how to do this?

Thanks in advance

Steve
 
Steve,

The Autofilter already works in the way you describe. If you've selected a
value from a field, other field's dropdowns show only available values.
Maybe it will work for your application.
 
Earl Kiosterud said:
Steve,

The Autofilter already works in the way you describe. If you've selected a
value from a field, other field's dropdowns show only available values.
Maybe it will work for your application.

Hi

Thanks for replying.

It doesn't work. I've tried to have ComboBox1 'fill' the a cell which
has an autofilter set already, but the available list then given in
ComboBox2 is still all the businesses.

Steve
 
Debra Dalgleish has some techniques for doing this with data|validation.

You could adapt it to work with comboboxes.
 
Dave said:
Debra Dalgleish has some techniques for doing this with data|validation.

You could adapt it to work with comboboxes.

Thanks for the nod. I'll have a look & see what comes of it.

S:)
 

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

Back
Top