MoveAfterReturn Property

Microsoft Office Web Components Visual Basic

Determines whether the active cell will be moved when the user presses the ENTER key. The default value is True. Use the MoveAfterReturnDirection property to determine which direction the active cell moves when the user presses ENTER. Read/write Boolean.

expression.MoveAfterReturn

expression    Required. An expression that returns a Spreadsheet object.

Example

This example causes the active cell to remain selected after the user presses the ENTER key.

Spreadsheet1.MoveAfterReturn = False