Sure, here it is.
aPartCaptions is a single dimension public array loaded when the
application starts up.
Private Sub UserControl_Initialize()
Dim iElement As Integer
Dim sCaption As String
For iElement = 0 To UBound(aPartCaptions)
sCaption = aPartCaptions(iElement)
If Alltrim(sCaption) <> "" Then
cboParts.AddItem sCaption
End If
Next
End Sub
When I double-click on the form with the combo control on it in the
Project Window, I get a 'Subscript out of range error' on the line
with the 'For'.
The problem as I see it is that the UserControl_Initialize is firing
when VB attempts to open the form with the control on it in the
design window, but the array only exists in run-time.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people