Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Changing direction of cursor after hitting enter - toggling with toolbar macro??

After all these years of using Excel, decided that I finally need a
solution to this bit of annoyance <g, although most of the time after
hitting Enter, I need the cursor to move to the right (esp. when
entering text), I find that too many times, I come across jobs where I
need the cursor to move down after hitting Enter. Anyone who really
works with inputting data in Excel, knows exactly what I mean.

I've done the manual workaround each time to get around this, I'll
manually change the movement via the Options.

Was hoping for a button that acts like a toggle. When raised, the
movement goes to the right; when depressed, the movement will be down.

I can picture the icon to draw, too.

But is there VB coding to do the actual changing? or perhaps there is
an option in the commands for a toolbar option that already exists to
do this (?).

Thanks. Any help appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Changing direction of cursor after hitting enter - toggling with toolbar macro??

One way:

Public Sub ToggleEnterDirection()
With Application
If .MoveAfterReturnDirection = xlToRight Then
.MoveAfterReturnDirection = xlDown
Else
.MoveAfterReturnDirection = xlToRight
End If
End With
End Sub





In article ,
StargateFan wrote:

After all these years of using Excel, decided that I finally need a
solution to this bit of annoyance <g, although most of the time after
hitting Enter, I need the cursor to move to the right (esp. when
entering text), I find that too many times, I come across jobs where I
need the cursor to move down after hitting Enter. Anyone who really
works with inputting data in Excel, knows exactly what I mean.

I've done the manual workaround each time to get around this, I'll
manually change the movement via the Options.

Was hoping for a button that acts like a toggle. When raised, the
movement goes to the right; when depressed, the movement will be down.

I can picture the icon to draw, too.

But is there VB coding to do the actual changing? or perhaps there is
an option in the commands for a toolbar option that already exists to
do this (?).

Thanks. Any help appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Changing direction of cursor after hitting enter - toggling withtoolbar macro??

Maybe something like:

Option Explicit
Sub testme()

Dim iCtr As Long
Dim myDirections As Variant
Dim myStrings As Variant

myDirections = Array(xlDown, xlUp, xlToLeft, xlToRight, xlDown)
myStrings = Array("Down", "Up", "Left", "Right", "Down")

For iCtr = LBound(myDirections) To UBound(myDirections)
If Application.MoveAfterReturnDirection = myDirections(iCtr) Then
Application.MoveAfterReturnDirection = myDirections(iCtr + 1)
MsgBox "changed to: " & myStrings(iCtr + 1)
Exit For
End If
Next iCtr

End Sub



StargateFan wrote:

After all these years of using Excel, decided that I finally need a
solution to this bit of annoyance <g, although most of the time after
hitting Enter, I need the cursor to move to the right (esp. when
entering text), I find that too many times, I come across jobs where I
need the cursor to move down after hitting Enter. Anyone who really
works with inputting data in Excel, knows exactly what I mean.

I've done the manual workaround each time to get around this, I'll
manually change the movement via the Options.

Was hoping for a button that acts like a toggle. When raised, the
movement goes to the right; when depressed, the movement will be down.

I can picture the icon to draw, too.

But is there VB coding to do the actual changing? or perhaps there is
an option in the commands for a toolbar option that already exists to
do this (?).

Thanks. Any help appreciated.


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Changing direction of cursor after hitting enter - toggling with toolbar macro??

Wow, that was super fast! <g

Thanks, will give this a try.

Cheers!

On Fri, 28 Jan 2005 20:42:25 -0600, Dave Peterson
wrote:

Maybe something like:

Option Explicit
Sub testme()

Dim iCtr As Long
Dim myDirections As Variant
Dim myStrings As Variant

myDirections = Array(xlDown, xlUp, xlToLeft, xlToRight, xlDown)
myStrings = Array("Down", "Up", "Left", "Right", "Down")

For iCtr = LBound(myDirections) To UBound(myDirections)
If Application.MoveAfterReturnDirection = myDirections(iCtr) Then
Application.MoveAfterReturnDirection = myDirections(iCtr + 1)
MsgBox "changed to: " & myStrings(iCtr + 1)
Exit For
End If
Next iCtr

End Sub



StargateFan wrote:

After all these years of using Excel, decided that I finally need a
solution to this bit of annoyance <g, although most of the time after
hitting Enter, I need the cursor to move to the right (esp. when
entering text), I find that too many times, I come across jobs where I
need the cursor to move down after hitting Enter. Anyone who really
works with inputting data in Excel, knows exactly what I mean.

I've done the manual workaround each time to get around this, I'll
manually change the movement via the Options.

Was hoping for a button that acts like a toggle. When raised, the
movement goes to the right; when depressed, the movement will be down.

I can picture the icon to draw, too.

But is there VB coding to do the actual changing? or perhaps there is
an option in the commands for a toolbar option that already exists to
do this (?).

Thanks. Any help appreciated.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Changing direction of cursor after hitting enter - toggling with toolbar macro??

On Fri, 28 Jan 2005 19:40:09 -0700, JE McGimpsey
wrote:

One way:

Public Sub ToggleEnterDirection()
With Application
If .MoveAfterReturnDirection = xlToRight Then
.MoveAfterReturnDirection = xlDown
Else
.MoveAfterReturnDirection = xlToRight
End If
End With
End Sub


Just saw your message, sorry for delay in responding. It came in late
(ah, servers <g!).

I'll try this, thank you!

In article ,
StargateFan wrote:

After all these years of using Excel, decided that I finally need a
solution to this bit of annoyance <g, although most of the time after
hitting Enter, I need the cursor to move to the right (esp. when
entering text), I find that too many times, I come across jobs where I
need the cursor to move down after hitting Enter. Anyone who really
works with inputting data in Excel, knows exactly what I mean.

I've done the manual workaround each time to get around this, I'll
manually change the movement via the Options.

Was hoping for a button that acts like a toggle. When raised, the
movement goes to the right; when depressed, the movement will be down.

I can picture the icon to draw, too.

But is there VB coding to do the actual changing? or perhaps there is
an option in the commands for a toolbar option that already exists to
do this (?).

Thanks. Any help appreciated.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Changing direction of cursor after hitting enter - toggling with toolbar macro??

On Fri, 28 Jan 2005 19:40:09 -0700, JE McGimpsey
wrote:

One way:

Public Sub ToggleEnterDirection()
With Application
If .MoveAfterReturnDirection = xlToRight Then
.MoveAfterReturnDirection = xlDown
Else
.MoveAfterReturnDirection = xlToRight
End If
End With
End Sub


EXCELLENT! Finally got around to creating icon and assigning macro
(working on 2 or 3 other Excel projects). But this is going to be a
big help as I'm using Excel heavily now and sometimes data entry goes
down and sometimes one enters data along rows.

Thanks so much!

In article ,
StargateFan wrote:

After all these years of using Excel, decided that I finally need a
solution to this bit of annoyance <g, although most of the time after
hitting Enter, I need the cursor to move to the right (esp. when
entering text), I find that too many times, I come across jobs where I
need the cursor to move down after hitting Enter. Anyone who really
works with inputting data in Excel, knows exactly what I mean.

I've done the manual workaround each time to get around this, I'll
manually change the movement via the Options.

Was hoping for a button that acts like a toggle. When raised, the
movement goes to the right; when depressed, the movement will be down.

I can picture the icon to draw, too.

But is there VB coding to do the actual changing? or perhaps there is
an option in the commands for a toolbar option that already exists to
do this (?).

Thanks. Any help appreciated.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Changing direction of cursor after hitting enter - toggling with toolbar macro??

For those that would prefer a keyboard solution to a VBA/icon one: The
Enter key is not the only key that can be used to enter something into
a cell. The 4 arrow keys can also be used as "Enter" keys.

For example, I have my Enter key set to stay in the current cell upon
enter. For times I need to enter something into a cell and upon enter
have the cell pointer go to the cell to the right, I hit the right
arrow INSTEAD of the Enter key. This enters whatever I've typed into
the current cell and immediately goes to the cell to the right - all
without hitting the Enter key.

Likewise, when I want the cellpointer to go to the cell below upon
enter, I hit the down arrow instead of the enter key. Whatever I've
typed is then entered into the current cell, and the cellpointer
immediately goes to the cell below - again without hitting the Enter
key.

This obviously also works with the up and left arrows as well as any
other movement keys, like Page Up, Page Down, Ctrl+Home, etc. (though
probably less practical).

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Changing direction of cursor after hitting enter - toggling with toolbar macro??

To elaborate on your mesage, the Tab key can also be used to move onto
another cell. This is particularly useful when you have locked cells, as the
focus jumps to the next available unlocked cell.

Ian

"Paul D. Simon" wrote in message
oups.com...
For those that would prefer a keyboard solution to a VBA/icon one: The
Enter key is not the only key that can be used to enter something into
a cell. The 4 arrow keys can also be used as "Enter" keys.

For example, I have my Enter key set to stay in the current cell upon
enter. For times I need to enter something into a cell and upon enter
have the cell pointer go to the cell to the right, I hit the right
arrow INSTEAD of the Enter key. This enters whatever I've typed into
the current cell and immediately goes to the cell to the right - all
without hitting the Enter key.

Likewise, when I want the cellpointer to go to the cell below upon
enter, I hit the down arrow instead of the enter key. Whatever I've
typed is then entered into the current cell, and the cellpointer
immediately goes to the cell below - again without hitting the Enter
key.

This obviously also works with the up and left arrows as well as any
other movement keys, like Page Up, Page Down, Ctrl+Home, etc. (though
probably less practical).



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 disable the cursor movement after hitting enter in a cell Randy R Excel Discussion (Misc queries) 1 September 16th 09 02:30 AM
How do I prevent cursor advancement after hitting enter? DanC Excel Discussion (Misc queries) 1 August 7th 09 06:55 PM
change direction when hitting enter key Using Excel in Conifer Excel Discussion (Misc queries) 1 March 5th 09 09:13 PM
Hitting Enter to Move Cursor to the Next Entry Cell Cisnerax Excel Worksheet Functions 3 February 25th 06 11:04 AM
Cursor not to move when hitting the enter key Alex Martinez Excel Worksheet Functions 1 May 12th 05 05:40 AM


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