CodeItBetter Programming Another VB Programming Blog

How to disable beep when user presses the Enter key in TextBox

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
'Controls - How to disable beep when user presses the Enter key in TextBox

Option Explicit
 
Private Sub Text1_KeyPress(KeyAscii As Integer)
    'If you want to do something when user press enter, for example:
    'If KeyAscii = 13 Then MsgBox "Enter Pressed"
    'Then put your line code before the following line.
    If KeyAscii = 13 Then KeyAscii = 0
End Sub
Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.