ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Capture Enter in textbox (https://www.excelbanter.com/excel-programming/385277-capture-enter-textbox.html)

FClifton

Capture Enter in textbox
 
I would like to make it so that when a user presses enter in a single line
textbox, the textbox value gets written into some other place and the focus
ends up back in the textbox. I could do all that if I could capture the
Enter, but I don't see a way to do that. Any ideas?

Tom Ogilvy

Capture Enter in textbox
 
Look at the keydown or keyup events in a textbox from the control toolbox
toolbar.

You don't say where the textbox is, so make sure you read the help on these
events. (such as cautions for a userform with a commandbutton set to true
for the default property).

--
Regards,
Tom Ogilvy




"FClifton" wrote:

I would like to make it so that when a user presses enter in a single line
textbox, the textbox value gets written into some other place and the focus
ends up back in the textbox. I could do all that if I could capture the
Enter, but I don't see a way to do that. Any ideas?



All times are GMT +1. The time now is 01:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com