On the other hand, this code does work for multiple records. The problem is it will only go to 9 columns.
On column 10 I get an Error 380 “Could not set the List property. Invalid Property value.” ErrorCode:'query and other things are here Set adoRS = New ADODB.Recordset adoRS.Open sSQL, ADOCn Do While Not adoRS.EOF 'myArray = adoRS.GetRows '~~> Update listbox ' With Me.ListBox1 ' .Clear ' .ColumnCount = 14 '<~~ Column Count as Applicable ' .List = myArray ' '.List = Application.Transpose(myArray) ' .ListIndex = -1 ' End With ListBox1.AddItem adoRS(0) ListBox1.List(i, 1) = adoRS(1) ListBox1.List(i, 2) = adoRS(2) ListBox1.List(i, 3) = adoRS(3) ListBox1.List(i, 4) = adoRS(4) ListBox1.List(i, 5) = adoRS(5) ListBox1.List(i, 6) = adoRS(6) ListBox1.List(i, 7) = adoRS(7) ListBox1.List(i, 8) = adoRS(8) ListBox1.List(i, 9) = adoRS(9) ' ListBox1.List(i, 10) = adoRS(10) 'this line gives me the 380 error i = i + 1 adoRS.MoveNext Loop adoRS.Close Set adoRS = Nothing




Reply With Quote