MrIrishExcelDude
Board Regular
- Joined
- Jan 7, 2009
- Messages
- 51
Ok, this is probably a really simple question but its been a while since I worked on VBA and I cant figure this out...
I have a userform with 1 test box. After entering a value in the text box and press enter, the userform should disappear (UserForm1.Hide). Where do I put this code so that it is triggered when the user presses "Enter"?
It works perfectly for me if I put it in DblClick and I double click the text box Or if I add another control to the userform and put the code in the exit event. But I dont know where to put it for when you press enter
Any advice or help is highly appreciated.
I have a userform with 1 test box. After entering a value in the text box and press enter, the userform should disappear (UserForm1.Hide). Where do I put this code so that it is triggered when the user presses "Enter"?
It works perfectly for me if I put it in DblClick and I double click the text box Or if I add another control to the userform and put the code in the exit event. But I dont know where to put it for when you press enter
Any advice or help is highly appreciated.