Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

key Tab and cells

Status
Not open for further replies.

Fursten

Programmer
Dec 27, 2000
403
PT
Hi,

Imagine I want to work with four cells and a lot of rows.
To navigate inside the cells I use the Tab key.

I would like to, when reached the forth cell (with the tab), that the positioning of the cursor become the first cell of the next row...

Is this possible?

Sergio Oliveira
 
This is not exactly what you want, because it has a few additional side effects, but much easier than the alternative (trying to trap Tab key events through an OnKey event routine). Add this to the code for the worksheet you're working with:

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Target.Column = 5 Then
      Selection.Offset(1, -4).Select
   End If
End Sub

Any time the selection is changed to the fifth column, this will automatically select the first column in the next row.
I hope this helps.
Rob
 
This limits tabbing to any range you specify
However, this also disables editing of cells outside the range specified.

Select the range you want to limit tabbing to

Format->Cells (Protection tab; clear 'locked' checkbox)

Tools->Protection (Protect worksheet)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top