+ Reply to Thread
Results 1 to 3 of 3

Thread: Multi-Column Listboxes correspond to multi textboxes

  1. #1
    Registered User
    Join Date
    04-17-2011
    Location
    Orlando
    MS-Off Ver
    Excel 2007
    Posts
    27

    Angry Multi-Column Listboxes correspond to multi textboxes

    I am Stumped...

    I have set up a userform that contains a listbox with 6 columns. Above that I have 6 textboxs that I would like to correspond to the Listbox.


    So when I select a row on the listbox, the cells of that row populate the textboxes.

    Is this possible??


    Thank you for your Time!!

    -Kyle

  2. #2
    Forum Guru pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,155

    Re: Multi-Column Listboxes correspond to multi textboxes

    Hi Crebsington
    what have you tired?
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    VBA for smarties - snb

  3. #3
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    mineral city, ohio
    MS-Off Ver
    Excel 2007; Excel 2000
    Posts
    4,004

    Re: Multi-Column Listboxes correspond to multi textboxes

    Hi Kyle
    Try this code
    Option Explicit
    Private Sub ListBox1_Click()
        With ListBox1
            TextBox1.Text = .List(.ListIndex, 0)
            TextBox2.Text = .List(.ListIndex, 1)
            TextBox3.Text = .List(.ListIndex, 2)
            TextBox4.Text = .List(.ListIndex, 3)
            TextBox5.Text = .List(.ListIndex, 4)
            TextBox6.Text = .List(.ListIndex, 5)
        End With
    End Sub
    John

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

    In the event Code provided resolves your issue, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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.2.0