+ Reply to Thread
Results 1 to 4 of 4

How to force <enter> to behave like <alt> + <enter> within a cell

  1. #1
    luckyinky
    Guest

    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. #2
    Tom Ogilvy
    Guest

    Re: 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" <luckyinky@discussions.microsoft.com> wrote in message
    news:72D05C6E-87F5-4EB7-A30F-88BE74C0E038@microsoft.com...
    > 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. #3
    luckyinky
    Guest

    Re: 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" <luckyinky@discussions.microsoft.com> wrote in message
    > news:72D05C6E-87F5-4EB7-A30F-88BE74C0E038@microsoft.com...
    > > 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. #4
    Tom Ogilvy
    Guest

    Re: 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" <luckyinky@discussions.microsoft.com> wrote in message
    news:85384478-B479-4FFE-8B97-465CE1C179EC@microsoft.com...
    > 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" <luckyinky@discussions.microsoft.com> wrote in message
    > > news:72D05C6E-87F5-4EB7-A30F-88BE74C0E038@microsoft.com...
    > > > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1