Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default how can I make tabs work only in the colums being used?

Tabs move from colum to colum to the right. But, it keeps going to right
colums.
How can I make the tabs move right only until the last colum that I am
using, then move to the next row?

Thanks for your answer in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default how can I make tabs work only in the colums being used?

Start in A1

Tab to B1,C1,D1,E1,F1 entering data as you go.

When you leave F1 hit the ENTER ley to return to column A and one cell
down........A2

You will always go back to the column you started from.

i.e. start in C1.........go back to C2

OR unlock columns A:F and protect the sheet.

Tab key will go across to F then back to A one row down.

I prefer the first method because protecting a sheet can cause other problems.


Gord Dibben MS Excel MVP


On Fri, 29 Sep 2006 16:17:02 -0700, lecielbleu
wrote:

Tabs move from colum to colum to the right. But, it keeps going to right
colums.
How can I make the tabs move right only until the last colum that I am
using, then move to the next row?

Thanks for your answer in advance.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,073
Default how can I make tabs work only in the colums being used?

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
right click does not work to tabs jatman Excel Discussion (Misc queries) 3 April 3rd 23 10:58 AM
set up an index linked to work book tabs James Excel Worksheet Functions 2 September 12th 06 11:47 PM
Number of worksheet tabs as cell value? ie 4 work sheets = 4 cell value [email protected] Excel Discussion (Misc queries) 2 November 22nd 05 05:17 PM
one formula to make a multiplication table work Paige Excel Worksheet Functions 3 September 14th 05 06:30 PM
How do I make Excel worksheet tabs change appearance when chosen . fentrkn Excel Discussion (Misc queries) 1 March 14th 05 05:36 PM


All times are GMT +1. The time now is 05:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"