Cursor use in Excel

  • Thread starter Thread starter Donna
  • Start date Start date
D

Donna

Hi - How can I set the cursor to go U/D/R/L (that one for one PC). And then
on the other PC the cursor moves but in opposite directions.
 
You have covered all the directions.

What is opposite?

Also what action is moving the cursor?


Gord Dibben MS Excel MVP
 
Are you asking how to reverse the meaning of the arrow keys on the keyboard
(that is, how to make the Up Arrow send the cursor down to the cell below,
and so on)? If so, I don't think you can do that... well, at least not
easily if at all. Perhaps there is some Windows API function calls that
might be able to be employed, but I wouldn't want to check until I knew if
that was your question or not.
 
Hi Rick,

It's possibe to reassign all the keys on the keyboard, although I didn't
think that's what the user had in mind.

Here is the code:

Sub SetupRoutine()
Application.OnKey "{Down}", "myUp"
Application.OnKey "{Up}", "myDown"
Application.OnKey "{Right}", "myLeft"
Application.OnKey "{Left}", "myRight"
End Sub

Sub myUp()
ActiveCell.Offset(-1, 0).Select
End Sub

Sub myDown()
ActiveCell.Offset(1, 0).Select
End Sub

Sub myLeft()
ActiveCell.Offset(0, -1).Select
End Sub

Sub myRight()
ActiveCell.Offset(0, 1).Select
End Sub

Sub Reset()
Application.OnKey "{Down}"
Application.OnKey "{Up}"
Application.OnKey "{Right}"
Application.OnKey "{Left}"
End Sub

I've included a Reset routine because one might change one's mind. The
first route must be run first. To get it to run when you open a file attach
the code the thisWorkook's Open_Workbook event.
 
Back
Top