|
-
May 5th, 2000, 03:00 PM
#1
Thread Starter
Member
-
May 5th, 2000, 04:11 PM
#2
I had this problem once
Check out the KeyPress and KeyDown events of the textbox, and then use the code for an Enter key (which i think is vbKeyEnter, not sure though). If you open up the Objects browser in VB, there is a list of constants like this.
or failing that, you could always use a command button with its Default property set to true (you could hide it under the text box if you wanted.
-
May 5th, 2000, 04:34 PM
#3
Fanatic Member
-
May 5th, 2000, 04:36 PM
#4
Fanatic Member
...
Here's the code (I think)
Code:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
'Do your code here
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|