I have private sub textbox1_keydown and private sub textbox1_afterupdate. If im finish filling up textbox1 then clicking the combobox still populates it with lists. But when im finish filling up textbox1 then pressing the enter key the combobox populates a abnormal lists. cmbo4 is a sub event where it populates the combobox based on what i input in the textbox1. My codes in on a userform
Heres my code:
Private sub TextBox1_KeyDown(ByVal KeyCode As_
MSForms.ReturnInteger,ByVal Shift As Integer)
If KeyCode=13 Then
ComboBox4.Clear
Call cmbo4
ComboBox4.DropDown
ComboBox4.SetFocus
End If
End Sub
Now i have this textbox1_afterupdate event, im adding this event to avoid errors to my program when the user wants to use the mouse to click the next combobox and not by pressing enter.
Private Sub TextBox1_AfterUpdate()
ComboBox4.Clear
Call cmbo4
ComboBox4.DropDown
ComboBox4.SetFocus
End Sub
My problem is to stop the event textbox1_afterupdate to perform when the user press the enter key so that my combobox wont have abnormal lists