+ Reply to Thread
Results 1 to 9 of 9

Removing items from more than 2 List Boxes

  1. #1
    Registered User
    Join Date
    08-04-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    4

    Removing items from more than 2 List Boxes

    Hi Guys

    On my Userform I have 10 listboxes populated from the excel sheet. I have another listbox(listbox11) where I would like to selected a random item from listbox1 add to listbox11 and delete the item from listbox1 to listbox10.



    Please Login or Register  to view this content.
    The code at the current moment works partially. It directly skips to listbox10 Please can you help so the code works completely.
    Last edited by aleemj; 08-04-2012 at 08:20 AM. Reason: breaching code 3

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Removing items from more than 2 List Boxes

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Removing items from more than 2 List Boxes

    Here's a little code you might be able to play around with and get to work. If you cant and still want help upload your workbook.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-04-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Removing items from more than 2 List Boxes

    Hi Richard
    I have attached my excel file. I tried using your code with no success.
    Thankyou for help
    Attached Files Attached Files

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Removing items from more than 2 List Boxes

    How does the user indicate which item is to be removed from Listboxes 1-10 and added to ListBox11?
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  6. #6
    Registered User
    Join Date
    08-04-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Removing items from more than 2 List Boxes

    Listbox1 is populated by the excel sheet, column A. There is button within the user which generates the random item deletes it from listbox1, and add listbox 11. I want the item which has been add to the listbox 11 remove all other listboxes but they may places at difference indices

    Please Login or Register  to view this content.
    Last edited by arlu1201; 08-04-2012 at 01:11 PM.

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Removing items from more than 2 List Boxes

    aleemj,

    Welcome to the forum.

    I have added code tags to your post in place of the quote tags that you had put. As per forum rule 3, you need to use them whenever you put any code in your post, as told to you earlier in this thread. Please add them in future. If you need more information on how to use them, check my signature.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  8. #8
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Removing items from more than 2 List Boxes

    @aleemj

    On my Userform I have 10 listboxes populated from the excel sheet. I have another listbox(listbox11) where I would like to selected a random item from listbox1 add to listbox11 and delete the item from listbox1 to listbox10.
    Ok looking over your form now. What Exactly are you wanting to due? From your original post and looking at your Form I cannot tell what your wanting.

  9. #9
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Removing items from more than 2 List Boxes

    Something like

    Please Login or Register  to view this content.

+ 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