StopTextBoxFromBeeping

By | 2002-06-01

Show how to make a text box not beep but do something else when I hit the Enter key. This code example makes nothing happen, for an extended period of time:

Original Author: VB FAQ

Code

Sub Text1_KeyPress (KeyAscii As Integer)

If KeyAscii = 13 Then '13 is Key_Return
KeyAscii = 0
End If

End Sub

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.