+ Reply to Thread
Results 1 to 4 of 4

Is there a maximum number of items that can be put into a Userform listbox?

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Is there a maximum number of items that can be put into a Userform listbox?

    Hi,

    I have a userform and on this userform i have a listbox. When i try to put ~ 34000 items into a list box is gives me a run time error or "overflow". So i am wondering is there a limit to the number of items one can put into a list box?

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Is there a maximum number of items that can be put into a Userform listbox?

    Why on earth would you want to have 34,000 items in a list box. It kind of ruins the whole point IMO. I ran this code and i populated 100,000 just fine. The overflow is probably being cause by the declaration of your variable

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: Is there a maximum number of items that can be put into a Userform listbox?

    then i guess there was something else that was causing the issue...........if i run into it again i will post for now seems to be running fine.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Is there a maximum number of items that can be put into a Userform listbox?

    If the size of the range is less than 32,767, it can not be a variable declaration (If you declare it as Integer). It might be that you are either dividing a number by zero or sometimes if you have a long date, you get an overflow error.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Colour items in Userform Listbox
    By Lukael in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-11-2014, 02:44 PM
  2. [SOLVED] Add Selected Items From One ListBox to Another ListBox on UserForm
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2014, 06:53 PM
  3. Listbox, Need to change number of items in List (not the items)
    By Kalithro in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-14-2013, 09:23 PM
  4. VBA edit listbox items on userform
    By Hilton1982 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2013, 03:51 AM
  5. Limit Maximum Items Selected in VBA Listbox
    By jrkujak in forum Excel General
    Replies: 2
    Last Post: 11-09-2011, 12:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1