+ Reply to Thread
Results 1 to 6 of 6

Clear UserForm Multi Select ListBox

  1. #1
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Clear UserForm Multi Select ListBox

    Hi

    I'm trying to clear a UserForm Multi Select ListBox

    This Code works on a UserForm Single Select ListBox
    Please Login or Register  to view this content.
    but does NOT work on a Multi Select ListBox.

    I've resorted to this Code for the Multi Select
    Please Login or Register  to view this content.
    Is there a more direct way of doing this without iterating through all the elements in the Multi Select ListBox?
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  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: Clear UserForm Multi Select ListBox

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

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Clear UserForm Multi Select ListBox

    Hi Norie

    Apparent no go...get an Error Message "Permission Denied" with this Code
    Please Login or Register  to view this content.

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

    Re: Clear UserForm Multi Select ListBox

    Have you populated the listbox via RowSource?

    If you have that's why you get the error.

    What you could do is clear the RowSource property first.
    Please Login or Register  to view this content.
    You would of course lose the many advantages of using RowSource.

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

    Re: Clear UserForm Multi Select ListBox

    Actually you can use this if you've used RowSource.
    Please Login or Register  to view this content.

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Clear UserForm Multi Select ListBox

    Hi Norie

    This appears to work
    Please Login or Register  to view this content.
    Thanks for you help...

+ 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] ListBox Multi-Select - Help
    By KyrieInfinity in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2013, 12:54 AM
  2. [SOLVED] userform Multi select listbox - add contents to list
    By tbar05 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-25-2013, 10:25 PM
  3. Multi select Listbox Items selection based on other Listbox item selection.
    By srinivassathi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2011, 05:53 AM
  4. Multi-Select ListBox
    By yawnzzzz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2011, 08:55 AM
  5. Listbox Multi Select
    By MikeT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2006, 03:30 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