Set Tab Key

  • Thread starter Thread starter EricBB
  • Start date Start date
E

EricBB

How do I set the TAB key to move 10 cells to the right? When I hit TAB, it
moves only one cell to the right. Is it possible?
 
First enter this sub:

Sub goright()
ActiveCell.Offset(0, 10).Select
End Sub

then enter and run this sub:

Sub setonkey()
Application.OnKey "{TAB}", "goright"
End Sub

This sets up the TAB key. If you are on A1 and touch TAB you will go to K1
 
Insert in sheet-code-module
works with Tab and Rightarrow key

Dim col

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = col + 1 Then ActiveCell.Offset(0, 9).Select
col = Target.Column
End Sub



"EricBB" skrev:
 
thanks gary, this is really what i want.

Gary''s Student said:
First enter this sub:

Sub goright()
ActiveCell.Offset(0, 10).Select
End Sub

then enter and run this sub:

Sub setonkey()
Application.OnKey "{TAB}", "goright"
End Sub

This sets up the TAB key. If you are on A1 and touch TAB you will go to K1
 
Back
Top