Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Make [ENTER] always go to Column B of the Next Line

Is there a way to override Excel's desire to go to the cell it thinks I want it to go to, and using VB force Excel to send the selection to the 2nd Column of the next line when the ENTER key is used?

magmike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Make [ENTER] always go to Column B of the Next Line

This will work if if you type a value and then the ENTER key. Install the following event macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim roww As Long
roww = Target.Row + 1
Cells(roww, 2).Select
End Sub


Because it is worksheet code, it is very easy to install and automatic to use:

1. right-click the tab name near the bottom of the Excel window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you have any concerns, first try it on a trial worksheet.

If you save the workbook, the macro will be saved with it.


To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Make [ENTER] always go to Column B of the Next Line

On Wednesday, August 8, 2012 11:07:23 AM UTC-5, magmike wrote:
Is there a way to override Excel's desire to go to the cell it thinks I want it to go to, and using VB force Excel to send the selection to the 2nd Column of the next line when the ENTER key is used? magmike


Thanks for the idea James. Unfortunately, this works too well. It is predicated on a change being made, and not the use of the Enter key. If I make a change and hit tab to go to the cell in the column to the right of my current selection, I instead get sent to the next line before I am ready. I am also hopeful to find a way to do this that would send me to Column B of the next line after hitting ENTER, even if a change was not made.

Anyother ideas?

magmike
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Make [ENTER] always go to Column B of the Next Line

If you want to avoid any VBA, you could always try protecting column A?

-paul

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
Is there a way to make the enter button work as regular enter Ricter Excel Discussion (Misc queries) 1 November 17th 09 02:50 AM
Is there a way (Excel 2003) to make a TWO LINE header in a column StanB Excel Discussion (Misc queries) 6 August 6th 07 08:57 PM
Make enter key return to first column J Excel Discussion (Misc queries) 1 December 14th 05 06:23 PM
enter data on 1 sheet and make it enter on next avail row on 2nd s Nadia Excel Discussion (Misc queries) 27 September 9th 05 03:39 PM
How to enter a two line column heading in excel Sharon New Users to Excel 9 April 6th 05 06:49 PM


All times are GMT +1. The time now is 10:00 AM.

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

About Us

"It's about Microsoft Excel"