cursor movement after data entered

H

Harvey Waxman

Is there any way to have the cursor move after data is entered depending on the
workbook or the sheet? I have some sheets where movement is best along a row
and others where it is better down the column. Or maybe a button in the menu
that can easily toggle this 'right' 'left' 'down' 'up' ?
 
B

Bernard REY

Harvey Waxman wrote :
Is there any way to have the cursor move after data is entered depending on
the workbook or the sheet? I have some sheets where movement is best along
a row and others where it is better down the column.
Or maybe a button in the menu that can easily toggle this 'right' 'left'
'down' 'up' ?

You can perform this through a couple of VBA lines, to be pasted in the
Sheet Code Sheet:

Dim OldSetting As Long

Private Sub Worksheet_Activate()
OldSetting = Application.MoveAfterReturnDirection
Application.MoveAfterReturnDirection = xlToRight 'or xlDown
End Sub

Private Sub Worksheet_Deactivate()
Application.MoveAfterReturnDirection = OldSetting
End Sub

This should do the job...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top