Consulting

Results 1 to 3 of 3

Thread: populate list box

  1. #1

    populate list box

    Does anyone know how to populate a listbox on an Excel userform with data from an Access recordset?

    I have a listbox(ListBox1) on a userform in Excel. I've connected to an Access database and opened a recordset (myRst). I would like to populate the listbox with the data from the recordset. I'm unable to use the AddItem method because it only adds to one column. My recordset has 5 fields. How do I populate the listbox to have multi columns and headers? I've been struggling because it seems like from Excel the rowsource property only works with spreadsheet ranges.

    Please somebody help me.

  2. #2
    VBAX Regular Ebrow's Avatar
    Joined
    May 2007
    Posts
    67
    Location
    Whats wrong with this answer?

    http://www.vbaexpress.com/forum/showthread.php?t=13293

    Edit Lucas: too many http's in your link...
    Nothing is impossible, just it hasn't been thought of yet.

  3. #3
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    He just posted there yesterday the 12th. Guess he didn't get an answer here so it's just as well.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

Posting Permissions

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