ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multiple selection in listbox (https://www.excelbanter.com/excel-programming/414823-multiple-selection-listbox.html)

johnrb7865

Multiple selection in listbox
 
Hello, I have 2 listboxes where if you select an item in one then click the
add button it will place it in the other listbox. I want to be able to select
multiple items in the first box and have them all move to the other. I set
the listbox properties to multiselect and it does let me select many, but it
will not let me move them to the other box. Any ideas?

Thanks,
John

Wigi

Multiple selection in listbox
 
In any case, you will have to write a loop through the items of the listbox,
and check whether they're selected or not.

See:

http://www.dailydoseofexcel.com/arch...elect-listbox/

or

http://www.dailydoseofexcel.com/arch...ect-listboxes/

If selected, then use AddItem to add the selected item to the second listbox.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"johnrb7865" wrote:

Hello, I have 2 listboxes where if you select an item in one then click the
add button it will place it in the other listbox. I want to be able to select
multiple items in the first box and have them all move to the other. I set
the listbox properties to multiselect and it does let me select many, but it
will not let me move them to the other box. Any ideas?

Thanks,
John


Dick Kusleika[_4_]

Multiple selection in listbox
 
On Tue, 29 Jul 2008 15:00:00 -0700, johnrb7865
wrote:

Hello, I have 2 listboxes where if you select an item in one then click the
add button it will place it in the other listbox. I want to be able to select
multiple items in the first box and have them all move to the other. I set
the listbox properties to multiselect and it does let me select many, but it
will not let me move them to the other box. Any ideas?


It won't do it automaticallty, you have to write code to make that happen.

http://www.dailydoseofexcel.com/arch...ect-listboxes/
--
Dick Kusleika
Microsoft MVP-Excel
http://www.dailydoseofexcel.com


All times are GMT +1. The time now is 04:24 AM.

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