ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Easily change Move selection after Enter option (https://www.excelbanter.com/excel-discussion-misc-queries/177805-easily-change-move-selection-after-enter-option.html)

Paul S[_2_]

Easily change Move selection after Enter option
 
I regularly use some files for which I want the cursor to go Down after
pressing Enter, and others where I want it to go Right.

Is there an icon I can set up on a toolbar to allow me to change the
option very quickly ?


Tim879

Easily change Move selection after Enter option
 

try this
Sub Toggle_Enter_Key_Direction()
'
' Toggles enter key between moving right and down
' Macro recorded 2/25/2008 by T. Bradshaw
'
'

If Application.MoveAfterReturnDirection = xlToRight Then
Application.MoveAfterReturnDirection = xlDown
Else
Application.MoveAfterReturnDirection = xlToRight
End If


End Sub


On Feb 25, 1:12 pm, (Paul S) wrote:
I regularly use some files for which I want the cursor to go Down after
pressing Enter, and others where I want it to go Right.

Is there an icon I can set up on a toolbar to allow me to change the
option very quickly ?



Paul S[_2_]

Easily change Move selection after Enter option
 
Tim879 wrote:


try this
Sub Toggle_Enter_Key_Direction()
'
' Toggles enter key between moving right and down
' Macro recorded 2/25/2008 by T. Bradshaw
'
'


If Application.MoveAfterReturnDirection = xlToRight Then
Application.MoveAfterReturnDirection = xlDown
Else
Application.MoveAfterReturnDirection = xlToRight
End If



End Sub



On Feb 25, 1:12 pm, (Paul S) wrote:
I regularly use some files for which I want the cursor to go Down after
pressing Enter, and others where I want it to go Right.

Is there an icon I can set up on a toolbar to allow me to change the
option very quickly ?


Thanks Tim, that works great.




All times are GMT +1. The time now is 01:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com