0

i am usng key ascii 13(Enter key) to move between text fields... but the problem is that it produce some sound i dont want that it produce that sound, can any one know how to avoid the beep in vb6?????

Private Sub Text1_KeyPress(KeyAscii As Integer)
On Error Resume Next
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by Agent-of-Chaos
0

thanks for response..
code is fine but it produce some sound when i press enter key and my problem is solved now... i google it and find this code which avoid making sound when user press enter key

If KeyAscii = vbKeyReturn Then KeyAscii = 0
End If

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.