LMoveDirection = Application.MoveAfterReturnDirectionĪpplication.MoveAfterReturnDirection = xlUp Private Sub Workbook_WindowActivate(ByVal Wn As Excel.Window) In this particular workbook, you can add the following code to the thisWorkbook object in the VBA editor: You can, however, use a little creative macro code to specify which direction you want to go after Enter, and have that code run whenever a workbook is activated.įor instance, let's say that you had a particular workbook, and you always want to move the selection up after pressing Enter. If you have a need to vary the Enter key behavior on a workbook-by-workbook basis, you might think you are out of luck. Changing the direction affects how Excel behaves in all workbooks. Adjust the Move Cursor After Enter setting. Excel displays the Options dialog box.įigure 1. When you press Enter after typing information into a cell, Excel normally saves your information and then moves to the next cell beneath the one where you pressed Enter.
0 Comments
Leave a Reply. |