I am wondering whether there is a way to program a user form so that, if you press Enter after filling in a text box, it will accept the entry and close the user form without the user having to click on the OK button.
I am wondering whether there is a way to program a user form so that, if you press Enter after filling in a text box, it will accept the entry and close the user form without the user having to click on the OK button.
Last edited by cmcgath; 09-13-2010 at 12:29 PM.
Try this
Please Login or Register to view this content.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
Set the Default property of the button to true and pressing Enter will be the same as clicking on it
Remember what the dormouse said
Feed your head
Thanks for the reply. I do not mean a command button. I am asking if there is any way I can use the Enter key after I finish my input into a text box and get the program to accept the value without making the user click on "OK".
Your post implied you have a button already. If you don't, then use Roy's code (but it's bad form design IMO).
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks