|
-
Aug 16th, 2001, 05:35 AM
#1
Thread Starter
Addicted Member
Using the return key with KeyPress Event
Hi All,
Can anyone tell me how I could capture the "Return Key" when using the KeyPress Event. I want the user to be able to type a string into a text box and once they press the return key for it to activate a given piece of code.
Many thanks,
Colin
-
Aug 16th, 2001, 05:47 AM
#2
Well ...
You could write code in the KeyPress event to trap the KeyAscii = vbKeyReturn. And do you have any command button set to Default? If so, set the .Default property to False.
.
-
Aug 16th, 2001, 06:12 AM
#3
Thread Starter
Addicted Member
Many thanks,
that worked a treat.
Colin
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
|