
I Feel Embarrassed To Ask This Question
Quote:
> Why dont any of the above work?????
The enter key is not trapped in the keypress event.
The Keydown event does trap it however.
eg:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If keycode = vbkeyreturn then
msgbox "Tada"
End If
End Sub
Note that vbKeyReturn is the constant for the enter key. It is usually
a better idea to use these constants as it makes debugging much easier.
Quote:
> i we all sure that 13 is enter?
> mad.....
> anyone else?
> --
> --
> Mark Fowkes
> - What I am Now Reading!
> - When The Wind Blows, James Patterson
> -
http://www.*-*-*.com/
-1/0
Quote:
> 26-7854878-1469213
> _________________________________________________
> Final Year Bsc Computing
> De-Montfort University Leicester
> ICQ No: 30486452
> Web Page:
> http://www.*-*-*.com/
> _________________________________________________
> > Mark,
> > Private Sub Text1_KeyPress(KeyAscii As Integer)
> > If (KeyAscii = 13) Then
> > MsgBox "Keep asking questions and you will soon be a guru"
> > End If
> > End Sub
> > > All
> > > this must be one of the easiest questions for you guys....
> > > I know the character number for enter is 13, but i how do i
incorporate
> this
> > > into an if...
> > > If ("Enter key pressed") then
> > > msgbox("mark is {*filter*}at VB")
> > > end if
> > > i have tried quite a few things but just cannot seem to get it to
work!!
> > > --
> > > --
> > > Mark Fowkes
Sent via Deja.com http://www.*-*-*.com/
Before you buy.