Link to home
Start Free TrialLog in
Avatar of shyline777
shyline777

asked on

Max items in Listbox control

Can anyone tell me: what is maxium items can be added to the list box control?10,000? thanks
Avatar of vinnyd79
vinnyd79

I think the limit only applies to Win9.x, which the max is 32,767
ASKER CERTIFIED SOLUTION
Avatar of EDDYKT
EDDYKT
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shyline777

ASKER

THANKS
If you look in VB's Object browser, you'll see that the Listindex property is of type Integer.

Thus the limit is the integer limit - 32767 (Making it 32768 possible items in a listbox)
Agreed, ran a test on this, to add a new item into a listbox iteratively, exiting either when an error was reached or when the list count was greater than 32767.  Error generated @ 32767.  It'll let you keep adding, but you can't get at any of the items, and it throws your count way out of whack.  (ListCount starts returning negative numbers)