View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default how to change (override) enter key behaviour in a cell

Look up the OnKey method in VBA help. I think that is what you want...

HTH

"helpwithXL" wrote:

thanx to all who replied to my last post regarding enter key behaviour.
but problem is still not solved. i think i should have been more clear.
the moveAfterReturn method is only boolean type and it tells if the
enter key will be effective or not, that is, if moveAfterReturn = true
(by default),then pressing enter will take the user to next cell and if
moveAfterReturn = false then pressing enter will not have any effect at
all. moveAfterReturnDirection tells only direction in which cell
selection will move.
my problem is that i want to go to the next line in the SAME cell when
i press enter and not to the next cell. i can go to next line in same
cell by alt+enter (now also) but i have a specific requirement in which
i have to over ride enter key so that when user presses enter key , the
cursor remains in the same cell but on the next line.

TIA
regards