Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform - Move to next textbox field by hitting enter instead of
Hey all,
As the subject states... I'm designing many userforms for this workbook and a lot of the users are used to hitting enter to move to the next field. I only know of using tab to move to the next one. Is there a way to accomplish this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform - Move to next textbox field by hitting enter instead of
Tim,
Unfortunately, I have to develop for people who aren't familiar with windows functions, too. (Such as using tab to switch text boxes instead of enter like in Excel.) Here were my two solutions: 1. When the Default property of all buttons on the userform is set to False, using the enter button should advance to the next text box. However, this is not a particularly good solution for users who do know how to use tab (or aren't too lazy to learn it) because they'll want to use enter to activate the default button, like choosing the "OK" button when all the necessary data has been entered. Instead, I chose solution #2: 2. Explain to your users how to use windows and hope like crazy they're more responsive than a pile of bricks. I'm sure you could also intercept any enter key presses, but isn't that too much coding for a simple [user] problem? Also, you'd incur the same detriment as above (I want my default buttons, darn it! That doesn't make me an elitist, does it?) Hope I helped. -Mike "TimT" wrote in message ... Hey all, As the subject states... I'm designing many userforms for this workbook and a lot of the users are used to hitting enter to move to the next field. I only know of using tab to move to the next one. Is there a way to accomplish this? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform - Move to next textbox field by hitting enter instead
....thank god I'm not alone.
Thanks for the insite and the chuckle. "Mike Mertes" wrote: Tim, Unfortunately, I have to develop for people who aren't familiar with windows functions, too. (Such as using tab to switch text boxes instead of enter like in Excel.) Here were my two solutions: 1. When the Default property of all buttons on the userform is set to False, using the enter button should advance to the next text box. However, this is not a particularly good solution for users who do know how to use tab (or aren't too lazy to learn it) because they'll want to use enter to activate the default button, like choosing the "OK" button when all the necessary data has been entered. Instead, I chose solution #2: 2. Explain to your users how to use windows and hope like crazy they're more responsive than a pile of bricks. I'm sure you could also intercept any enter key presses, but isn't that too much coding for a simple [user] problem? Also, you'd incur the same detriment as above (I want my default buttons, darn it! That doesn't make me an elitist, does it?) Hope I helped. -Mike "TimT" wrote in message ... Hey all, As the subject states... I'm designing many userforms for this workbook and a lot of the users are used to hitting enter to move to the next field. I only know of using tab to move to the next one. Is there a way to accomplish this? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform - Move to next textbox field by hitting enter instead of
Hi Mike
I disagree 150%. In an Excel environment, where these users are expected to come from, Enter completes a cell entry and jumps to the next cell. The default "Windows Form" behavior is less relevant. No, it does not require much code, it's done within 20 seconds. For each textbox, copypaste this and change its name in the title: Private Sub TextBox1_KeyDown(ByVal KeyCode As _ MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 13 Then KeyCode = 9 End Sub And even if it did require hours of code; do it. Developers are there to serve users, users are not there to serve developers. Anything improving the user experience is worth doing. Best wishes Harald "Mike Mertes" skrev i melding ... Tim, Unfortunately, I have to develop for people who aren't familiar with windows functions, too. (Such as using tab to switch text boxes instead of enter like in Excel.) Here were my two solutions: 1. When the Default property of all buttons on the userform is set to False, using the enter button should advance to the next text box. However, this is not a particularly good solution for users who do know how to use tab (or aren't too lazy to learn it) because they'll want to use enter to activate the default button, like choosing the "OK" button when all the necessary data has been entered. Instead, I chose solution #2: 2. Explain to your users how to use windows and hope like crazy they're more responsive than a pile of bricks. I'm sure you could also intercept any enter key presses, but isn't that too much coding for a simple [user] problem? Also, you'd incur the same detriment as above (I want my default buttons, darn it! That doesn't make me an elitist, does it?) Hope I helped. -Mike "TimT" wrote in message ... Hey all, As the subject states... I'm designing many userforms for this workbook and a lot of the users are used to hitting enter to move to the next field. I only know of using tab to move to the next one. Is there a way to accomplish this? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform - Move to next textbox field by hitting enter instead
Harald,
That sounds well and good but I have almost 50 or so fields, so I would need to write that for each field? "Harald Staff" wrote: Hi Mike I disagree 150%. In an Excel environment, where these users are expected to come from, Enter completes a cell entry and jumps to the next cell. The default "Windows Form" behavior is less relevant. No, it does not require much code, it's done within 20 seconds. For each textbox, copypaste this and change its name in the title: Private Sub TextBox1_KeyDown(ByVal KeyCode As _ MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 13 Then KeyCode = 9 End Sub And even if it did require hours of code; do it. Developers are there to serve users, users are not there to serve developers. Anything improving the user experience is worth doing. Best wishes Harald "Mike Mertes" skrev i melding ... Tim, Unfortunately, I have to develop for people who aren't familiar with windows functions, too. (Such as using tab to switch text boxes instead of enter like in Excel.) Here were my two solutions: 1. When the Default property of all buttons on the userform is set to False, using the enter button should advance to the next text box. However, this is not a particularly good solution for users who do know how to use tab (or aren't too lazy to learn it) because they'll want to use enter to activate the default button, like choosing the "OK" button when all the necessary data has been entered. Instead, I chose solution #2: 2. Explain to your users how to use windows and hope like crazy they're more responsive than a pile of bricks. I'm sure you could also intercept any enter key presses, but isn't that too much coding for a simple [user] problem? Also, you'd incur the same detriment as above (I want my default buttons, darn it! That doesn't make me an elitist, does it?) Hope I helped. -Mike "TimT" wrote in message ... Hey all, As the subject states... I'm designing many userforms for this workbook and a lot of the users are used to hitting enter to move to the next field. I only know of using tab to move to the next one. Is there a way to accomplish this? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform - Move to next textbox field by hitting enter instead
The alternative (subclassing) requires at least two lines of individual code
for every box too, so it's about as simple as this gets. So yes, but also no, not write, copy-paste it and replace each single "TextBox1" with each unit's name. C'mon, once done it's done. Best wishes Harald "TimT" skrev i melding ... Harald, That sounds well and good but I have almost 50 or so fields, so I would need to write that for each field? |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform - Move to next textbox field by hitting enter instead
Brilliant Harald!
Thank you so much. You are absolutely right, it's not that bad and it makes me feel alot better about myself knowing I can provide what the user is looking for. Much thanks brah. TTeska Tax Technology Marcum & Kliegman LLP Melville, NY 631.414.4594 "Harald Staff" wrote: Hi Mike I disagree 150%. In an Excel environment, where these users are expected to come from, Enter completes a cell entry and jumps to the next cell. The default "Windows Form" behavior is less relevant. No, it does not require much code, it's done within 20 seconds. For each textbox, copypaste this and change its name in the title: Private Sub TextBox1_KeyDown(ByVal KeyCode As _ MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 13 Then KeyCode = 9 End Sub And even if it did require hours of code; do it. Developers are there to serve users, users are not there to serve developers. Anything improving the user experience is worth doing. Best wishes Harald "Mike Mertes" skrev i melding ... Tim, Unfortunately, I have to develop for people who aren't familiar with windows functions, too. (Such as using tab to switch text boxes instead of enter like in Excel.) Here were my two solutions: 1. When the Default property of all buttons on the userform is set to False, using the enter button should advance to the next text box. However, this is not a particularly good solution for users who do know how to use tab (or aren't too lazy to learn it) because they'll want to use enter to activate the default button, like choosing the "OK" button when all the necessary data has been entered. Instead, I chose solution #2: 2. Explain to your users how to use windows and hope like crazy they're more responsive than a pile of bricks. I'm sure you could also intercept any enter key presses, but isn't that too much coding for a simple [user] problem? Also, you'd incur the same detriment as above (I want my default buttons, darn it! That doesn't make me an elitist, does it?) Hope I helped. -Mike "TimT" wrote in message ... Hey all, As the subject states... I'm designing many userforms for this workbook and a lot of the users are used to hitting enter to move to the next field. I only know of using tab to move to the next one. Is there a way to accomplish this? |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform - Move to next textbox field by hitting enter instead
Glad to hear that. Thank you for the feedback.
Besst wishes Harald "TimT" skrev i melding ... Brilliant Harald! Thank you so much. You are absolutely right, it's not that bad and it makes me feel alot better about myself knowing I can provide what the user is looking for. Much thanks brah. TTeska Tax Technology Marcum & Kliegman LLP Melville, NY 631.414.4594 |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform - Move to next textbox field by hitting enter instead
Harald,
I just realized, I know what I needed to ask you... Is there any way that I could simply pull up a list of all the textboxes/objects on a particular form that I am working on? example: if I'm replacing all the "Textbox_1"'s... that's about 83 of them I have to do and even though I used a consistant naming convention I can't remember them all. Solution? "Harald Staff" wrote: Glad to hear that. Thank you for the feedback. Besst wishes Harald "TimT" skrev i melding ... Brilliant Harald! Thank you so much. You are absolutely right, it's not that bad and it makes me feel alot better about myself knowing I can provide what the user is looking for. Much thanks brah. TTeska Tax Technology Marcum & Kliegman LLP Melville, NY 631.414.4594 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
move to the right after hitting enter using macros | Excel Discussion (Misc queries) | |||
Automatically move to adjacent cells without hitting Enter | Excel Discussion (Misc queries) | |||
Hitting Enter to Move Cursor to the Next Entry Cell | Excel Worksheet Functions | |||
What does hitting Ctrl + Shift + Enter to enter a formula do??? Help a n00b out. | Excel Worksheet Functions | |||
Cursor not to move when hitting the enter key | Excel Worksheet Functions |