' Make a text box on a form called text1
' Paste this code into the Declaration part of the form
' Set the MultiLine property to False
' Add text, press ENTER and see what happens
' Have fun!!!   

' Blaine (73730,761)

' PS If you've got a neat trick, pass it on... I'd like to
' hear about it.

Sub text1_KeyDown (KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
           Case KEY_RETURN
	        KeyCode = 0
                ' add routine for when user hits <ENTER>
                msgbox "You hit enter and there was NO BEEP!!!"

'          Case ...  add for other keys here (i.e. <ESC> to cancel)

   End Select
Exit Sub


Sub text1_KeyPress (KeyAscii As Integer)
    Const RETURN_KEY_PRESSED = 13
    If KeyAscii = RETURN_KEY_PRESSED Then KeyAscii = 0
End Sub
