+ Reply to Thread
Results 1 to 2 of 2

Multiselect Listbox use

  1. #1
    RKS
    Guest

    Multiselect Listbox use

    Once I multiple select on the listbox created from Forms tool box - how do I
    use it ... where do I have the results of multiple selection

  2. #2
    Dave Peterson
    Guest

    Re: Multiselect Listbox use

    You'll need a macro to extract the values.

    I'd put a button from that same Forms toolbar right next to the listbox. Then
    the user can click that button when they want to extract the values.

    Then assign this kind of code to that button:

    Option Explicit
    Sub testme()

    Dim myLB As ListBox
    Dim DestCell As Range
    Dim iCtr As Long

    With ActiveSheet
    Set DestCell = .Range("B1")
    Set myLB = .ListBoxes("List box 1")
    End With

    With myLB
    'clear out previous entries?
    DestCell.Resize(.ListCount, 1).ClearContents

    For iCtr = 1 To .ListCount
    If .Selected(iCtr) Then
    DestCell.Value = .List(iCtr)
    Set DestCell = DestCell.Offset(1, 0)
    End If
    Next iCtr
    End With

    End Sub



    RKS wrote:
    >
    > Once I multiple select on the listbox created from Forms tool box - how do I
    > use it ... where do I have the results of multiple selection


    --

    Dave Peterson

+ 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