I have a spreadsheet where the user is supposed to enter text into a specific cell. That text may be a single sentence, or it may be several paragraphs. I want Excel to convert the enter key to a carriage return and cause the cursor to stay in the same cell.
I have something kind of working like I want, but there are still some issues:
private sub worksheet_change(byval Target as Range)
Foo
If Target.address = Range("Description").address then
Range("Description").Select
Application.sendkeys "{F2}%{ENTER}"
End if
end sub
This will add the enter like I want, but exiting out of it is cumbersome; you have to press enter one last time, then escape to jump out of the worksheet_change sub (if you just press escape, you loose the last line).
I'd like to have the Tab key jump out, or have the escape key work without having to press the proceeding enter.
Anyone got a better method?
Bookmarks