+ Reply to Thread
Results 1 to 2 of 2

Multiselect List Box

  1. #1
    Bill
    Guest

    Multiselect List Box

    Hello All,
    I have a list box that I populate using the following code:

    Load Userform1
    Userform1.varinclude.Clear
    For i = 1 To NV
    Userform1.varinclude.AddItem VarNames(i)
    Next i

    I know I can use "selected" to determine what has been selected in the list
    box. Is there a quick way of telling if nothing has been selected? I can
    set of for loop to see if each selected is false, but though there might be
    a quicker way.

    Thanks.



  2. #2
    Bernie Deitrick
    Guest

    Re: Multiselect List Box

    Bill,

    You could use the Listbox's change event to set a flag, but you won't be able to tell if an item is
    selected and then de-selected, just that an item was (at some time) selected.

    HTH,
    Bernie
    MS Excel MVP


    "Bill" <[email protected]> wrote in message
    news:[email protected]...
    > Hello All,
    > I have a list box that I populate using the following code:
    >
    > Load Userform1
    > Userform1.varinclude.Clear
    > For i = 1 To NV
    > Userform1.varinclude.AddItem VarNames(i)
    > Next i
    >
    > I know I can use "selected" to determine what has been selected in the list box. Is there a quick
    > way of telling if nothing has been selected? I can set of for loop to see if each selected is
    > false, but though there might be a quicker way.
    >
    > Thanks.
    >




+ 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