+ Reply to Thread
Results 1 to 5 of 5

ListBox with multiple selections

  1. #1
    Registered User
    Join Date
    01-20-2006
    Posts
    6

    ListBox with multiple selections

    I have a UserForm with 3 ListBoxes from which the user makes selections, and the resulting selections appear in specific cells on an Excel Worksheet ("list"). ListBox1 (LB1) is a multiselect, while the other LB's are single selections. When I call up the UserForm all 3 LB's populate fine. My selections off LB2 and LB3 appear on the worksheet as they should, however I am having problems with the selections off LB1. The selections don't appear. Ideally I'd like to limit the selections off LB1 to only two, and I want these to appear in cells A20 and A21 on my "List" sheet.

    I'm using Excel 2003

    I appreciate any direction.

    Here's my code for this listbox:

    Please Login or Register  to view this content.
    Thank you,

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Problems with ListBox with multiple selections

    Try this, if not then post example file.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    01-20-2006
    Posts
    6

    Re: Problems with ListBox with multiple selections

    Andy,

    I tried your code but no luck.

    I attached the file and code.

    I wonder if there is something I need to do to the properties of the ListBox. I did set it to MultiSelect. Again, ListBoxes 2 & 3 both are single selections and both work fine.

    Thank you for your help.
    Attached Files Attached Files

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: ListBox with multiple selections

    Click event does not fire when multi select is set.

    You could use the change event instead. Note the code will only output first 2 items.

  5. #5
    Registered User
    Join Date
    01-20-2006
    Posts
    6

    Re: ListBox with multiple selections

    Andy,

    Thank you very much...by changing the event code from Click to Change works.

    Tony Bender

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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