Hello All,
In order to make the 'Up' and 'Down' arrow keys work properly, I am using some code like the following:
First, the Worksheet Selection Change event:
and then, in a standard module:
My problem is that the left and right arrow keys will then want to select the left or right (unlocked) cell on the previous row, rather than on the newly selected one. I have been able to manage the right arrow key with the following:
First, at the top of the Worksheet Selection Change module:
and the following is a standard module:
The problem is the Left arrow key. I have tried the same with "+{Tab}" but it does not help. I have tried re-selecting the active cell after the standard sub has run, etc, etc. I cannot find anything that works. Any ideas?
Thanks,
David
In order to make the 'Up' and 'Down' arrow keys work properly, I am using some code like the following:
First, the Worksheet Selection Change event:
Code:
If Target.Row = 49 Or Target.Row = 58 Then
Application.OnKey "{Up}", "NextUp_toRow31"
GoTo UpArrowEnd
End If
and then, in a standard module:
Code:
Public Sub NextUp_toRow31
If ActiveCell.Address = "$AA$58" Then
If Range("E1").Value = 2 Then
Range("AF49").Select
GoTo End31
Else
Range("AF41").Select
GoTo End31
End If
End If
If ActiveCell.Address = "$AF$49" Then
Range("G47").Select
GoTo End31
End If
....
First, at the top of the Worksheet Selection Change module:
Code:
Application.OnKey "{RIGHT}", "MoveRight"
and the following is a standard module:
Code:
Public Sub MoveRight()
Application.SendKeys "{Tab}"
End Sub
Thanks,
David