MoveAfterReturnDirection Property
XlDirection
XlDirection can be one of these XlDirection constants. |
xlDown |
xlToLeft |
xlToRight |
xlUp |
expression.MoveAfterReturnDirection
*expression * Required. An expression that returns a Spreadsheet object.
Example
This example causes the cell to the right of the active cell to be selected after the user presses the ENTER key.
Sub MoveAfterEnter()
Dim ssConstants
Set ssConstants = Spreadsheet1.Constants
' Enable the MoveAfterReturn property.
Spreadsheet1.MoveAfterReturn = True
' Move the cursor one cell to the right when
' the user presses ENTER.
Spreadsheet1.MoveAfterReturnDirection = xlToRight
End Sub
Applies to | Spreadsheet Object
See Also | MoveAfterReturn Property