pro_vb thread: Keypress for combobox
Hi Mort,
I think you need the ComboBox1_KeyPress event
In the class dropdown box, go to ComboBox1 (or whatever you renamed it to),
then in the events dropdown, pick KeyPress
In the new sub, put
Select Case Asc(e.KeyChar)
Case 13
' Your Code Here
End Select
You could have "If Asc(e.KeyChar) <> 13 then Exit Sub", or "If
Asc(e.KeyChar) = 13 Then............End If", but it's worth the extra effort
now to make it flexible for the future.
Cheers,
Ian
|





