ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Possible to have only one value in a listbox (https://www.excelbanter.com/excel-programming/393826-possible-have-only-one-value-listbox.html)

[email protected]

Possible to have only one value in a listbox
 
I am creating a Listbox selection userform where values populated in
master listbox are selected and moved over to a listbox on the right
hand side. Is it possible where only one value goes into the right
hand list box and no more values allowed to populate that listbox?

I have multiselect set to 0.


Chip Pearson

Possible to have only one value in a listbox
 
In your code that does the move the item from the left listbox to the right
listbox, use something like

If RightListBox.ListCount = 0 Then
' move the item
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)

wrote in message
ps.com...
I am creating a Listbox selection userform where values populated in
master listbox are selected and moved over to a listbox on the right
hand side. Is it possible where only one value goes into the right
hand list box and no more values allowed to populate that listbox?

I have multiselect set to 0.




All times are GMT +1. The time now is 11:15 AM.

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