Excel - Navigate a user form using enter key

Asked By Mark Stephens on 08-Jan-09 08:32 AM
Should be simple but I cannot figure it out... is there a way to use the
enter key to navigate records? Basically  I have a user form and am loading
variables in it's fields based upon the values in a spreadsheet.

I want it so that each time the enter key is pressed the cursir drops a row
and the user form is then repopulated with the data.

I  know how to use accelerator keys to speed up entry but i cannot figure
out how to accompplish this simple task.  Any help much appreciated, thansk
and regards, mark




Joe replied on 08-Jan-09 09:50 AM
You can set the TabIndex number on each box so when you press the tab key you
can go from box to box.
Jim Cone replied on 08-Jan-09 10:01 AM
If those "fields" are actually Textboxes then set the "EnterKeyBehavior"
property to False for each Textbox.
And as Joel pointed out, the tab order must be set correctly.
--
Jim Cone
Portland, Oregon  USA



Should be simple but I cannot figure it out... is there a way to use the
enter key to navigate records? Basically  I have a user form and am loading
variables in it's fields based upon the values in a spreadsheet.

I want it so that each time the enter key is pressed the cursir drops a row
and the user form is then repopulated with the data.

I  know how to use accelerator keys to speed up entry but i cannot figure
out how to accompplish this simple task.  Any help much appreciated, thansk
and regards, mark
Mark Stephens replied on 08-Jan-09 07:36 PM
Hi guys,

I just got up so apologies for the delay replying (I'm in Singapore).

Basically i didn't explain my goal properly and so it has been
misunderstood... I am not actually talking about navigating between controls
on the userform, I am talking about moving from one record to another.
Basically I have a arrow control which when clicked will move the row in the
worksheet down one and then refresh the userform which displays data in the
active row.

I want to dispense with the need to use a mouse to click the arrow and make
it so when you press enter it moves to the next record. Using an accelerator
key is one way to go but then instead of pressing enter the user has to do
alt - x (if x is the accelerator key assigned) to go to the njext record,
which isn't so elegant.

Sorry for the failure to communicate, any ideas?

Thanks and regards. , Mark
Jim Cone replied on 08-Jan-09 08:09 PM
Have you considered the built-in Data Form, found on, well,
the Data menu?  Enter key moves you down a row, tab moves to next column.
Requires column labels on the worksheet.
-or-
J-Walk Enhanced Data Form (free) from...
http://spreadsheetpage.com/index.php/dataform/home
--
Jim Cone
Portland, Oregon  USA



Hi guys,
I just got up so apologies for the delay replying (I'm in Singapore).

Basically i didn't explain my goal properly and so it has been
misunderstood... I am not actually talking about navigating between controls
on the userform, I am talking about moving from one record to another.
Basically I have a arrow control which when clicked will move the row in the
worksheet down one and then refresh the userform which displays data in the
active row.

I want to dispense with the need to use a mouse to click the arrow and make
it so when you press enter it moves to the next record. Using an accelerator
key is one way to go but then instead of pressing enter the user has to do
alt - x (if x is the accelerator key assigned) to go to the njext record,
which isn't so elegant.

Sorry for the failure to communicate, any ideas?

Thanks and regards. , Mark