+ Reply to Thread
Results 1 to 6 of 6

Listbox, Need to change number of items in List (not the items)

  1. #1
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Florida
    MS-Off Ver
    Excel 2013
    Posts
    105

    Listbox, Need to change number of items in List (not the items)

    Well, I have searched for about 2 hours... Tried 100 things and am at the point of deleteing a 4 month project.

    I have a dynamic named range using Offset and Match "=OFFSET(Selections!$B$53,0,0,MATCH("*",Selections!$B$53:$B$153,-1),1)". The values in B53 to B153 are dynamic based on cell B5. I may have a list of 10 items or 100 or even 0.

    I have a userform with 8 listbox selections. 1 of the listbox selections controls 3 others. While the contents of the listbox change. The number of items in the list is not dynamic. If I open the form with 12 items in my range then I am stuck with a limit of 12 items in my listbox. I would like to change the number dynamicaly. I would like the listbox to work more like data validation, where I don't have an issue.

    I do not want to see ".additem" or any form of picking cell B12031031993 and using xlup!

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Listbox, Need to change number of items in List (not the items)

    Try something here? To change list box items you would definitely need to clear its content and add the desired items back again.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Listbox, Need to change number of items in List (not the items)

    You need to reload the listbox.
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Florida
    MS-Off Ver
    Excel 2013
    Posts
    105

    Re: Listbox, Need to change number of items in List (not the items)

    Could you specify how to reload the listbox. I searched for Refresh for about an hour and didn't see anything. Thats basicaly what I want to do.

    Edit!

    I did

    Please Login or Register  to view this content.
    Worked, but not going to use this.

    I did this to fix this.

    Please Login or Register  to view this content.
    Last edited by Kalithro; 08-14-2013 at 08:28 PM. Reason: Edit instead of Repost

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Listbox, Need to change number of items in List (not the items)

    How/when exactly is the list changing when you are using the userform?

  6. #6
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Florida
    MS-Off Ver
    Excel 2013
    Posts
    105

    Re: Listbox, Need to change number of items in List (not the items)

    The list changes when I make a selection from another ListBox on the User Form.
    Example
    I select Car from a list of (Car, Truck, Van) in ListBox1 (then Car is exported to cell B5). Cells B53-B154 update with info.
    Then ListBox 2 updates with that info. I can now select Mini from a list (Two-Seater, Mini, Subcompact, etc...) then have that data exported to Cell B6.
    Then ListBox 3 has other Car features. Exported to Cell B7.

    I have it working now. All I had to do was reslect the same Named Range and reselct the same RowSource.

+ 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] Auto select items in a Listbox with items from another Listbox
    By perducci in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-22-2013, 04:45 PM
  2. Transfer random listbox items to new listbox and then loop through selected items
    By narrowgate88 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-31-2013, 05:58 PM
  3. Replies: 0
    Last Post: 08-21-2012, 11:35 PM
  4. listbox number of items
    By eldee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-18-2011, 07:08 AM
  5. How do I refer to the items in a combobox by their number in the list of items?
    By lottesfog in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2007, 10:03 PM

Tags for this Thread

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