Link to home
Start Free TrialLog in
Avatar of col_jack_oneal
col_jack_oneal

asked on

key presses

get VB to responed to a press of the enter key
ASKER CERTIFIED SOLUTION
Avatar of bobbit31
bobbit31
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sweat
Sweat

col jack,

The KeyPress event can identify the ENTER key and you can then do what you want with it.

Private Sub Text1_KeyPress(KeyAscii As Integer)

     If KeyAscii = 13 Then
        KeyAscii=0
        ' Your code here
        Exit Sub
     End If

Hope this helps,

Sweat