Can't set Option/Advanced/Editing/MoveAfterEnter RRS feed

  • Question

  • Why doesn't this work in Word? --

    Sub NavSwitch()
        If Application.MoveAfterReturn = xlRight Then
            Application.MoveAfterReturnDirection = xlDown
            MsgBox ("Down")
            Application.MoveAfterReturnDirection = xlRight
            MsgBox ("Right")
        End If
    End Sub


    Robert Homes

    • Edited by Robert Homes Tuesday, July 9, 2019 12:23 PM forgot to say which app
    Tuesday, July 9, 2019 12:21 PM

All replies

  • Hi Robert,

    The MoveAfterReturn property is a boolean property which returns true if the active cell is moved as soon as the Enter (Return) key is pressed.

    If the MoveAfterReturn property is false, the selection doesn't move at all, regardless of how the MoveAfterReturnDirectionproperty is set.

    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Tuesday, July 9, 2019 1:01 PM