VB to filter a list

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
 
E

Earl Kiosterud

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

CrankyLemming

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
 
D

Dave Peterson

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

You could adapt it to work with comboboxes.
 
C

CrankyLemming

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:)
 
Top