Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
move to the right after hitting enter using macros Santa Fe Al Excel Discussion (Misc queries) 2 November 18th 09 07:45 PM
Automatically move to adjacent cells without hitting Enter Doug Excel Discussion (Misc queries) 7 August 11th 09 07:14 PM
Hitting Enter to Move Cursor to the Next Entry Cell Cisnerax Excel Worksheet Functions 3 February 25th 06 11:04 AM
What does hitting Ctrl + Shift + Enter to enter a formula do??? Help a n00b out. qwopzxnm Excel Worksheet Functions 2 October 20th 05 09:06 PM
Cursor not to move when hitting the enter key Alex Martinez Excel Worksheet Functions 1 May 12th 05 05:40 AM


All times are GMT +1. The time now is 05:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"