code to select more than one item from a combo box

  • Thread starter Thread starter Lin
  • Start date Start date
L

Lin

Hello,

What is the code to select more than one item from a combobox ina form?

Any help, reallly appreciated

Thank you,

Lincy
 
Combo boxes can only contain a single value.

List boxes can be set to allow either single or multiple selections. If set
to allow multiple selections, each individual Item in the list has a
Selected property which is either T/F and the listbox itself has an
ItemsSelected collection that can be looped through.
 
Hello,

What is the code to select more than one item from a combobox ina form?

Any help, reallly appreciated

Thank you,

Lincy

You can't, using a combo box.
You can using a List Box.
Set the ListBox to Multiselect Simple (or Extended).
Then you need to use code to read which items have been selected, and
then do something with it.
VBA help on ItemsSelected has some code you can use to read the
values.
 
Lin,

If you look at my post under the subject 'GotFocus event fires twice' you
will see a technique I'm using to make the list box 'dropdown' like a combo
box by changing it's height using the GotFocus and LostFocus events. That way
I can have a multi-select box that drops down when the user clicks on it.

John
 
Back
Top