+ Reply to Thread
Results 1 to 3 of 3

ListBox2 only returns first item in range

  1. #1
    Forum Contributor
    Join Date
    08-14-2006
    Location
    USA
    MS-Off Ver
    2019
    Posts
    686

    ListBox2 only returns first item in range

    ListBox2 is determined by finding the selection in Listbox1 on MyLists!A:A and returning data in all cells to the right
    Please Login or Register  to view this content.
    When ListBox1 selection = the value in A3
    RadRng correctly = "MyLists!$B$3:$E$3"

    But ListBox2 only shows the value in B3 and NOT C3, D3 and E3

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Carstowal,

    The range is a 2-dimensional array. The default setting for a ListBox is a 1-dimensional array. Change the ColumnCount property to match the number of columns in the Range. In your case change it to 4 to display the range "MyLists!$B$3:$E$3".

    Sincerely,
    Leith Ross

  3. #3
    Forum Contributor
    Join Date
    08-14-2006
    Location
    USA
    MS-Off Ver
    2019
    Posts
    686
    that works, but the data is displayed in 4 columns
    B3 C3 D3 E3

    the user will have to scroll over to find what she wants.

    is there a way to transpose the data to list vertically, such as:
    B3
    C3
    D3
    E3

    edited:
    just figured this out:
    SelectMatl.ListBox2.List = Application.Transpose(Range(RadRng).Value)

    unless there's a better way!

    THANKS FOR THE HELP LEITH
    Last edited by carsto; 07-25-2008 at 02:01 PM.

+ 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