If I use the following code in Excel, I cannot copy and paste between worksheets, if the code is deleted everything seems in order:
' moving the cursor to the right rather than down Private Sub Worksheet_Activate() Application.MoveAfterReturnDirection = xlToRight End Sub ' move the cursor down Private Sub Worksheet_Deactivate() Application.MoveAfterReturnDirection = xlDown End Sub
If I use the ENTER key, the default behaviour is: move the cursor down.
Above code should change this behaviour to moving the cursor to the right, just for one worksheet.
Note: I can copy and paste on the same worksheet, but not between the worksheet, associated with this code and any other worksheet.
copy and paste still would work between any other worksheets.