Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Changing the behavior of the "tab" button

I have a worksheet setup where there are 4 data entry columns. The
other columns are locked and cannot be selected. This application is
intended for live data entry and speed in entry is extremely
important.

One of the data entry columns is a "Comment" column that will rarely
be selected. As the user enters data, I would like for the active
cell to go A1, B1, C1, A2, B2, C2, A3... each time they press the tab
key. I only want them to go to column D (comment column) if they
actually move the cursor to that column and select a cell.

As it is right now of course, the user has to press tab twice after
entering column C data in order to get back to column A. I would like
to avoid that 2nd tab entry if it is possible.

Thanks.
Sterling
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Changing the behavior of the "tab" button

Right click on the sheet tab and select view code.

Place this in the resulting module:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Target.Column < 4 Then
Application.EnableEvents = False
Columns("A:C").Select
Target.Activate
End If
If Target.Column 4 Then
Application.EnableEvents = False
Cells(Target.Row + 1, 1).Select
End If
ErrHandler:
Application.EnableEvents = True
End Sub


This should give you some ideas - you can adjust to match your desired
behavior.

--
Regards,
Tom Ogilvy

"Sterling" wrote in message
om...
I have a worksheet setup where there are 4 data entry columns. The
other columns are locked and cannot be selected. This application is
intended for live data entry and speed in entry is extremely
important.

One of the data entry columns is a "Comment" column that will rarely
be selected. As the user enters data, I would like for the active
cell to go A1, B1, C1, A2, B2, C2, A3... each time they press the tab
key. I only want them to go to column D (comment column) if they
actually move the cursor to that column and select a cell.

As it is right now of course, the user has to press tab twice after
entering column C data in order to get back to column A. I would like
to avoid that 2nd tab entry if it is possible.

Thanks.
Sterling



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
How do I stop "global" hyperlinks changing to "local" links? Em Excel Worksheet Functions 2 August 26th 08 01:18 PM
HELP! Clicking "$" button changes format to ";;" not what it shoul Rock Robster Excel Discussion (Misc queries) 1 October 7th 06 04:04 AM
Excel: Changing "numeric $" to "text $" in a different cell. Heather_CCF Excel Worksheet Functions 1 September 5th 06 06:06 PM
Changing data source in pivot table- "Back" button is disable Ashok Excel Discussion (Misc queries) 0 November 8th 05 02:06 PM
Changing "returned" values from "0" to "blank" LATATC Excel Worksheet Functions 2 October 20th 05 04:41 PM


All times are GMT +1. The time now is 03:59 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"