How to trigger event when accepting a default cell value?

SteveInAlabama

Board Regular
Joined
Aug 22, 2002
Messages
94
My app has a range "rProductionInput" to allow operator entry of production information for each production run during their shift. I am successfully using Worksheet_Change for all the empty cells in a row to move the cursor to the right as well as other associated code I want to run.

My problem is that the last two columns of each new record are pre-filled (pre-loaded, pre-? ) with a default value based on the prior values of that row. If the user agrees with the default, they would naturally just press the Enter key to confirm. But how do I trap this keystroke - since there is no Change event?

I would like the operator's confirmation of the second-to-last value to move the cursor one cell right, and a confirm of the last value to move to activate the first cell of the next row down. So simply messing with the Application.MoveAfterReturn and Application.MoveAfterReturnDirection properties doesn't help the last cell go down and left to the first cell of the next row. Plus I prefer to not change the functionality of other worksheets they may have open. I would like to do this with VBA code.

How would you trap the Enter keystroke itself when inside range rProductionInput?

Thanks in advance for your help!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,216,126
Messages
6,129,004
Members
449,480
Latest member
yesitisasport

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top