List Box
Eliminate Pivot Table Annoyances
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: List Box

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Location
    Pittsburgh, PA
    Posts
    354
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I have a UserForm containing a ListBox. The ListBox contains two columns [each filled by an array]. The second column is linked to a cell in the worksheet.

    MY PROBLEM -- If the second column contains values that are identical, the ListBox stops functioning whenever I try to click one of the duplicate entries.

    Anyone have any information about why this could be happening?
    Thanks in advance,
    Patrick

  2. #2
    Board Regular
    Join Date
    Apr 2002
    Location
    Pittsburgh, PA
    Posts
    354
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Okay. I started with a blank workbook. I created a list as shown below:

    [RangeA1:B6]
    A 100
    B 101
    C 102
    D 100
    E 103
    F 100

    I created a UserForm with a ListBox. The ListBox has the entire range A1:B6 as its RowSource. The ControlSource is D1. The ColumnCount is set to 2. The BoundColumn is set to 2. When you show the form, you will NOT be able to select D or F. I need to be able to select these additional entries.

    How can I do this? Can this be done? I am currently assigning my RowSource with an Array.

    Help!!!
    Thanks in advance,
    Patrick

  3. #3
    Board Regular
    Join Date
    Apr 2002
    Location
    Pittsburgh, PA
    Posts
    354
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    I figured it out!!!

    Here is how I did it:

    For n = 0 To (CountListArray - 1)
    If ExpenseErrorsListBox.Selected(n) = _
    True Then
    ItemSelected = _
    ExpenseErrorsListBox.List(n, 1)
    End If
    Next n

    The CountListArray is a Public variable that was used in a different Sub.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com