Click to See Complete Forum and Search --> : What is the limit for ListBox entries?


Dark Sean
October 25th, 2000, 01:59 PM
Hello, I just came across a problem with one of my apps that is leading me to believe that there is a limit to the number of entries I can add to my a file of zip listbox. I read codes into my listbox to sort and dedupe them, but it seems the value cannot be greater than the value of an integer? After the Listcount went ove 32k then the listcount became a negative value.

Is there a way to change the the values that a listbox can hold?

Thanks,
Sean

TCartwright
October 25th, 2000, 02:03 PM
If you are looking to sort, why don't you just use a sorting routine? I doubt Microsoft thought there would ever be a need for more than 32k items inside of a listbox... As to dedupe???? What is that?

Tim Cartwright 'Will write code for food.
Sr Systems Architect - Information Systems
Splitrock Services Inc.

Dark Sean
October 25th, 2000, 02:08 PM
By dedupe I mean get rid of the duplicate entries...

So there is no way to get more than 32k inside a listbox? My code works great to sort and dedup, it would be a shame to have to start from scratch.

Lothar Haensler
October 26th, 2000, 02:02 AM
in NT you CAN get more than 32 K into a list box.
The problem is: the ListCount property is of type Integer. The limit for an Integer is around 32 K!

Thus, you will have problem iterating over your listbox entries using a "for i = 0 to list1.listcount-1" loop.

Better use a Listview control.