PatrioticTX
Programmer
I am building a multi-column MS Forms 2.0 listbox from a 2D array. The array has 8 columns and approximately 1300 rows. It takes nearly 30 seconds to add the array items to the listbox. The build section of the code is listed below. The listbox must be requeried when the user reopens the form (appox every 4 minutes) due to multi-user access, so a delay of ~30 seconds is unacceptable (about one hour of downtime for a full day)!
Thank you!!!
Code:
For iCurRec = 0 To UBound(RSArray, 2)
Me!lstWUCSubSystems.AddItem
Me!lstWUCSubSystems.List(iCurRec, 0) = RSArray(0, iCurRec)
Me!lstWUCSubSystems.List(iCurRec, 1) = RSArray(1, iCurRec)
Me!lstWUCSubSystems.List(iCurRec, 3) = RSArray(3, iCurRec)
If RSArray(8, iCurRec) <> 27 Then
Me!lstWUCSubSystems.List(iCurRec, 2) = RSArray(2, iCurRec)
If LenB(RSArray(4, iCurRec)) > 0 Then
Me!lstWUCSubSystems.List(iCurRec, 4) = RSArray(4, iCurRec)
Else
Me!lstWUCSubSystems.List(iCurRec, 4) = vbNullString
End If
Me!lstWUCSubSystems.List(iCurRec, 5) = RSArray(5, iCurRec)
Me!lstWUCSubSystems.List(iCurRec, 6) = RSArray(6, iCurRec)
Me!lstWUCSubSystems.List(iCurRec, 7) = RSArray(7, iCurRec)
End If
Next iCurRec
Thank you!!!