I have a Windows form with 50 ComboBox controls.
Is there any way to put the code below in a loop so I don't have to have 50 such Subs?
Is there any way to put the code below in a loop so I don't have to have 50 such Subs?
Problem Code:
Private Sub ComboLine1_Keypress(sender As System.Object, e As System.EventArgs) Handles ComboLine1.KeyPress Call CheckKeyPressEntries(e) End Sub Private Sub ComboLine2_KeyPress(sender As System.Object, e As System.EventArgs) Handles ComboLine2.KeyPress Call CheckKeyPressEntries(e) End Sub Private Sub ComboLine3_KeyPress(sender As System.Object, e As System.EventArgs) Handles ComboLine3.KeyPress Call CheckKeyPressEntries(e) End Sub Private Sub ComboLine4_KeyPress(sender As System.Object, e As System.EventArgs) Handles ComboLine4.KeyPress Call CheckKeyPressEntries(e) End Sub