Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to force <enter to behave like <alt + <enter within a cell

I want the cursor to go to the next line within a cell when the user presses
the <enter key. Does anyone know how to do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to force <enter to behave like <alt + <enter within a cell

Alt+Enter does what you want. enter is not supported for this this and
macros essentially don't run while editing a cell.

--
Regards,
Tom Ogilvy

"luckyinky" wrote in message
...
I want the cursor to go to the next line within a cell when the user

presses
the <enter key. Does anyone know how to do this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to force <enter to behave like <alt + <enter within a c

Tom,
Thanks for the reply. I realize that <alt + <enter does what I want it
to but I need to "overload" the <enter key to act like <alt + <enter. Is
there no way to do this? i.e. via a Macro or some other VBA code

"Tom Ogilvy" wrote:

Alt+Enter does what you want. enter is not supported for this this and
macros essentially don't run while editing a cell.

--
Regards,
Tom Ogilvy

"luckyinky" wrote in message
...
I want the cursor to go to the next line within a cell when the user

presses
the <enter key. Does anyone know how to do this?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to force <enter to behave like <alt + <enter within a c

Perhaps you could do something like this:

Public Sub SetKey()
Application.OnKey "~", "rTurn"
End Sub

Public Sub UnSetKey()
Application.OnKey "~"
End Sub

Sub rTurn()
ActiveCell.Value = ActiveCell.Value & Chr(10)
SendKeys "{F2}{End}{Right}"
End Sub


--
Regards,
Tom Ogilvy

"luckyinky" wrote in message
...
Tom,
Thanks for the reply. I realize that <alt + <enter does what I want

it
to but I need to "overload" the <enter key to act like <alt + <enter.

Is
there no way to do this? i.e. via a Macro or some other VBA code

"Tom Ogilvy" wrote:

Alt+Enter does what you want. enter is not supported for this this and
macros essentially don't run while editing a cell.

--
Regards,
Tom Ogilvy

"luckyinky" wrote in message
...
I want the cursor to go to the next line within a cell when the user

presses
the <enter key. Does anyone know how to do this?






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 force users to first enter data in one cell before anythi des-sa[_2_] Excel Discussion (Misc queries) 2 June 3rd 08 10:29 PM
Enter multiple numbers in a cell so total shows when enter keypres newbie Excel Worksheet Functions 2 August 19th 07 12:23 PM
Auto enter date when data in enter in another cell Brian Excel Worksheet Functions 5 December 7th 06 06:44 PM
Force user to enter data in cell before moving to next cell Fusionmags New Users to Excel 3 November 19th 06 11:49 PM
how do I enter a RETURN (Enter) in a cell in EXCEL2003 Micheline Excel Discussion (Misc queries) 5 April 14th 05 10:00 PM


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

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"