ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Working with ListBox with frmListStyleOption set (https://www.excelbanter.com/excel-programming/428154-working-listbox-frmliststyleoption-set.html)

Ayo

Working with ListBox with frmListStyleOption set
 
I have a ListBox, on a UserForm, with the ListStyle property set to
frmListStyleOption. What I am trying to figure out is a way to limit the
number of items that can be selected in the ListBox to, say 5. And once 5
items have been selected I want the rest of the items in the ListBox disabled.
Is there a way to do this? If so, please point me in the right direction.
Thanks
Ayo

ryguy7272

Working with ListBox with frmListStyleOption set
 
Maybe this:
http://www.cpearson.com/excel/ListBoxUtils.htm

Good luck,
Ryan---
--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Ayo" wrote:

I have a ListBox, on a UserForm, with the ListStyle property set to
frmListStyleOption. What I am trying to figure out is a way to limit the
number of items that can be selected in the ListBox to, say 5. And once 5
items have been selected I want the rest of the items in the ListBox disabled.
Is there a way to do this? If so, please point me in the right direction.
Thanks
Ayo


Dave Peterson

Working with ListBox with frmListStyleOption set
 
You didn't like the suggestions from Wednesday?

Ayo wrote:

I have a ListBox, on a UserForm, with the ListStyle property set to
frmListStyleOption. What I am trying to figure out is a way to limit the
number of items that can be selected in the ListBox to, say 5. And once 5
items have been selected I want the rest of the items in the ListBox disabled.
Is there a way to do this? If so, please point me in the right direction.
Thanks
Ayo


--

Dave Peterson


All times are GMT +1. The time now is 12:27 AM.

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