talytech
06-11-2007, 11:50 AM
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.
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.