+ Reply to Thread
Results 1 to 4 of 4

Storing selected items index from multiselect listbox into array

  1. #1
    Registered User
    Join Date
    11-08-2015
    Location
    Brazil
    MS-Off Ver
    Office 2016
    Posts
    4

    Storing selected items index from multiselect listbox into array

    Hi,
    I have a similar question made in this thread:
    http://www.excelforum.com/excel-prog...n-listbox.html

    Im working with a multiselect listbox and I want to store the index of the selected items into an array instead of the value of the selected items.

    I have tried using the Listindex, but I cant make it read all of the selected items index. It only reads the index of the first selected item.

    Hopefully someone can help me!

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Storing selected items index from multiselect listbox into array

    Hi Pamela2411,

    This will work for a listbox called ListBox1 from a command button on the form called CommandButton1:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Registered User
    Join Date
    11-08-2015
    Location
    Brazil
    MS-Off Ver
    Office 2016
    Posts
    4

    Re: Storing selected items index from multiselect listbox into array

    Thank you for the fast answer. This solved my question.

    The answer was actually quite obvious now that I look at your answer.

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Storing selected items index from multiselect listbox into array

    You're welcome. If you could mark the thread as solved it would be appreciated.

    Regards,

    Robert

+ 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] Return row index of selected items in multicolumn multiselect listbox
    By CaptainK in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-01-2014, 09:19 AM
  2. [SOLVED] Can't populate an array with selected items from listbox
    By jamesdeuce in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2014, 09:57 PM
  3. 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
  4. 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
  5. [SOLVED] Populating an array with selected ListBox items
    By wz4np1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-13-2012, 07:52 AM
  6. Multiselect ListBox - Active/Inactive Items
    By LCK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-02-2005, 08:45 PM
  7. ListBox Selected Items into an Array
    By jtp550 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-27-2005, 07:44 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