ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multiple Selections in a Combo Box??? (https://www.excelbanter.com/excel-programming/308923-multiple-selections-combo-box.html)

hce[_2_]

Multiple Selections in a Combo Box???
 
Hi

I created a userform in which there r 3 combo boxes... the user can
either choose to select the values in any of the combo boxes or don't
do anything before he clicks on the command button to run the requested
actions...

For eg, the user chooses the country in combo box1, cus type in combo
box2 and area in combo box3... n once the command button is clicked, a
macro will actually run to filter the database according to the values
of the 3 combo boxes...

my question now is, is excel able to take in multiple selections in the
combo boxes....? if yes how can i do it and how can i program the filter
codes to take in these additional "requests" cos currently my knowledge
only allows me to write code that will take only one value from each
combo boxes...

will appreciate any suggestions/advice... kindly advice me whether this
is "doable" or not...

cheers


---
Message posted from http://www.ExcelForum.com/


Tom Ogilvy

Multiple Selections in a Combo Box???
 
what is an "r 3 combo boxes"

if you mean comboboxes from the control toolbox toobar, then no, they do not
have a multiselect property. Plus the concept of a multiple selection for a
combobox is alien. Perhaps you mean listbox for which there is a
multiselect property.

cos currently my knowledge
only allows me to write code that will take only one value from each
combo boxes...


Not sure what "cos" (cosine?) means, but it isn't a limitation of your
knowledge. ActiveX Comboboxes and forms Dropdowns only have one value so I
would suspect your "r 3 combo boxes" have the same limitation.

Autofilter only can accept two conditions in each filter. So if you have
two conditions, you would just set them. (recording a marco while doing it
manually using custom shows you how). Advanced filter can accept more
complex conditions. "Or" conditions are in columns, "And" are inconditions
in rows.

--
Regards,
Tom Ogilvy

"hce " wrote in message
...
Hi

I created a userform in which there r 3 combo boxes... the user can
either choose to select the values in any of the combo boxes or don't
do anything before he clicks on the command button to run the requested
actions...

For eg, the user chooses the country in combo box1, cus type in combo
box2 and area in combo box3... n once the command button is clicked, a
macro will actually run to filter the database according to the values
of the 3 combo boxes...

my question now is, is excel able to take in multiple selections in the
combo boxes....? if yes how can i do it and how can i program the filter
codes to take in these additional "requests" cos currently my knowledge
only allows me to write code that will take only one value from each
combo boxes...

will appreciate any suggestions/advice... kindly advice me whether this
is "doable" or not...

cheers


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 08:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com