+ Reply to Thread
Results 1 to 4 of 4

Copy Selected items from multicolumn, multiselect listbox to another listbox

  1. #1
    Registered User
    Join Date
    01-11-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question Copy Selected items from multicolumn, multiselect listbox to another listbox

    I have an Excel 2007 userform with two listboxes
    Listbox1 is a 5column, multiselect listbox
    Listbox2 is a 5 column, single select listbox

    What's the best way to loop through listbox1 and copy all the selected items into listbox2?
    All 5 columns need to be copied.

    Any assistnace would be much appreciated.

    Thanks

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

    Re: Copy Selected items from multicolumn, multiselect listbox to another listbox

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Copy Selected items from multicolumn, multiselect listbox to another listbox

    Hi,

    if you are using the RowSource property to fill the Listbox, are you?, you cannot remove/add items right away but have to change the source itself.

    I am using ListViews instead of ListBoxes for those purposes.

    Regards
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  4. #4
    Registered User
    Join Date
    01-11-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Copy Selected items from multicolumn, multiselect listbox to another listbox

    Works like a charm Norie. My frustration level and headache have now subsided. Thank you very much for the quick reply!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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