View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Carriage return in same cell without using alt-enter

Not without using code.

You cannot do it while entering the text string because code won't run while
in editing mode.

You could do it after entry with code if you trained her to use a particular
character where she wanted a new paragraph.

Upon her hitting Enter key the event code would run to substitute the
character with a linefeed.

Chr(91) is the [ character.

Private Sub Worksheet_Change(ByVal Target As Range)
With Target
.Replace what:=Chr(91), replacement:=Chr(10), _
lookat:=xlPart, SearchOrder:=xlByRows, MatchCase:=False
End With
End Sub

Personally I think Alt + Enter is just as easy while she is entering the
text.


Gord Dibben MS Excel MVP


On Tue, 5 Jan 2010 11:11:01 -0800, charlie54933
wrote:

I know to insert a new paragraph within the same cell to use the keystroke
alt-enter, however, I'm trying to make a usable form for my boss, and I'd
like to make it super user friendly and not have to have her use alt-enter
every time she needs to create a new paragraph in one particular cell. Any
way to use some kind of code to allow the new paragraph in the same cell at
just hitting the enter key?
Thank you!!