Sub AbilitaTAB()
Application.OnKey "{TAB}", "SaltoTab"
End Sub
Sub DisabilitaTAB()
Application.OnKey "+^{RIGHT}"
End Sub
Sub SaltoTab()
If ActiveCell.Column > 5 Then
If ActiveCell.Row > 40 Then
Cells(4, 3).Select
Else
If ActiveCell.Row < 4 Then
Cells(4, 3).Select
Else
If ActiveCell.Row = 40 Then
Cells(4, 3).Select
Else
Cells(ActiveCell.Row + 1, 3).Select
End If
End If
End If
Else
If ActiveCell.Row > 40 Then
Cells(4, 3).Select
Else
If ActiveCell.Column < 2 Then
If ActiveCell.Row < 4 Then
Cells(4, 3).Select
Else
Cells(ActiveCell.Row, 3).Select
End If
Else
If ActiveCell.Row < 4 Then
Cells(4, 3).Select
Else
ActiveCell.Offset(0, 1).Select
End If
End If
End If
End If
End Sub
|