
02-13-2002, 02:14 PM
|
 |
Ultimate Contributor
Retired Leader * Guru *
|
|
Join Date: Aug 2001
Posts: 5,343
|
|
Try this:
Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
'resetting the KeyAscii prevents the 'DING' sound
KeyAscii = 0
'do whatever: in this example, a msgbox is shown
MsgBox "Enter was pressed!", vbInformation, "Enter!"
End If
End Sub
|
|