Max items in Listbox control

Posted on 2004-11-22
Last Modified: 2012-06-27
Can anyone tell me: what is maxium items can be added to the list box control?10,000? thanks
Question by:shyline777
    LVL 28

    Expert Comment

    I think the limit only applies to Win9.x, which the max is 32,767
    LVL 26

    Accepted Solution

    I think you can add more than 32,767 but you have only access the first 32,767

    Author Comment

    LVL 11

    Expert Comment

    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)
    LVL 1

    Expert Comment

    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)

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Suggested Solutions

    Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now