Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If it really really really has to be the Tab key then select those
columns or use a Worksheet_SelectionChange event procedure such as... Option Explicit Public rngPreviousCell As Range Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim lLastColumn As Long lLastColumn = Cells(1, Range("1:1").Columns.Count).End(xlToLeft).Column On Error Resume Next If rngPreviousCell.Column < lLastColumn + 1 Then On Error GoTo 0 If ActiveCell.Column = lLastColumn + 1 Then Application.EnableEvents = False ActiveCell.Offset(1, -lLastColumn).Select End If Application.EnableEvents = True End If Set rngPreviousCell = ActiveCell End Sub which keeps the Tabbed-to-cell within the columns from column A up to the last used column. To get out of that range you will have to select a cell in the column after the next available column, since the code relies on the selection of a cell in the next available column to take the selection to the next row down. Ken Johnson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
right click does not work to tabs | Excel Discussion (Misc queries) | |||
set up an index linked to work book tabs | Excel Worksheet Functions | |||
Number of worksheet tabs as cell value? ie 4 work sheets = 4 cell value | Excel Discussion (Misc queries) | |||
one formula to make a multiplication table work | Excel Worksheet Functions | |||
How do I make Excel worksheet tabs change appearance when chosen . | Excel Discussion (Misc queries) |