+ Reply to Thread
Results 1 to 7 of 7

Multi select listbox code not working when 2 listboxes on sheet

  1. #1
    Registered User
    Join Date
    04-28-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Multi select listbox code not working when 2 listboxes on sheet

    Hi,

    I want a sheet which has 2 multi-select listboxes. Both listboxes have seperate information and I want the user to be able to select more than option from the drop-down.
    I found this code online and it works beautifully when I have 1 listbox.
    Please Login or Register  to view this content.
    How can alter this code so it applies to another listbox in column 10 ?
    If I copy this code again replacing column 12 with 10 and variable 'z' with 'x', it doesnt work.
    I end up having only 1 listbox in one column, even though I created a second listbox with different drop down values.
    Any help would be most appreciated!

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Multi select listbox code not working when 2 listboxes on sheet

    You can Target two Columns, something like...
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-28-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Multi select listbox code not working when 2 listboxes on sheet

    Thanks for the quick response! But that makes the same information appear in both the listboxes.
    I want 2 seperate listboxes.
    For example, listbox in column 10 will have a dropdown containing ' NY, Chicago, Dallas, Atlanta' and listbox in column 12 will have ' Tennis, Chess, Football, Baseball'.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Multi select listbox code not working when 2 listboxes on sheet

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    04-28-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Multi select listbox code not working when 2 listboxes on sheet

    I've attached a dummy file.
    I want lisboxes in column C and D wherein I can select more than option from the drop down.
    Currently, the listbox works in only column D.
    I want a multi-select listbox in column C which will allow me to select multiple cities just like column D allows me to select multiple games.
    The code currently seems to recognize the last created listbox only.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-28-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Multi select listbox code not working when 2 listboxes on sheet

    Please let me know if I can provide any further info.
    I've attached a dummy worksheet in my previous post to show what the code is currently doing. I want it to allow me to have 2 multi-select listboxes.

  7. #7
    Registered User
    Join Date
    04-28-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Multi select listbox code not working when 2 listboxes on sheet

    Pls help!!
    I'm not sure what information I can provide to get some assistance on this matter.

+ 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