+ Reply to Thread
Results 1 to 5 of 5

Values from MultiSelect ListBox

  1. #1
    Registered User
    Join Date
    05-10-2013
    Location
    chicago
    MS-Off Ver
    Excel 2010
    Posts
    52

    Values from MultiSelect ListBox

    I have a worksheet with a MultiSelect Listbox located in userform. It currently has 10 values that I want linked to a spreadsheet so when they are selected, the column next to it will show as either "True" or "False". In range A1 to A10 in the spreadsheet is the value connected to the listbox and I want the "True" or "False" value to show in range B1 to B10 if the associated value is selected.

    Also, the A1 to A10 is dynamic so I want the list box selections to grow as that list grows. I've attached an example.

    ListBoxTest.xlsb

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Values from MultiSelect ListBox

    Hello BVT3030,

    I made a couple of changes to the attached workbook's ListBox1. I changed the ListStyle property to fmListStyleOption. This places a check box by each entry letting the user know it is multiple choice.

    The RowSource property is now the dynamic named range MyRange. The formula for this named range is: =OFFSET(Sheet1!$A$1,1,0,COUNTA(Sheet1!$A:$A)-1,1)

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    05-10-2013
    Location
    chicago
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Values from MultiSelect ListBox

    That worked great thanks! One more thing, if I wanted to have it return the value of the box selected instead of true or false how would I adjust the code?

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Values from MultiSelect ListBox

    Hello BVT3030,

    Here is the updated code...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-10-2013
    Location
    chicago
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Values from MultiSelect ListBox

    That did the trick. Thank you.

+ 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] Multiselect listbox preselected values from matrix
    By Biffer in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-03-2014, 03:10 PM
  2. Multiselect Listbox Returning Array of Selected Index Values
    By Draco1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-27-2013, 06:46 PM
  3. Copy Selected items from multicolumn, multiselect listbox to another listbox
    By Willigb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-19-2013, 11:27 AM
  4. Help! How do i populate a cell with the values selected from a multiselect listbox?
    By mamakamsi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-12-2013, 11:48 AM
  5. Multiselect form listbox - selected values to be copied and pasted in a column
    By Ath01 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-04-2013, 01:37 AM
  6. Listbox (MultiSelect)
    By CobraLAD in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-13-2008, 11:58 PM
  7. MultiSelect Listbox get/use Values
    By Ikaabod in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-30-2007, 06:27 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