View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Determining if selection change was the result of ENTER

You can capture the key press of the enter key (note there are two enter
keys) something like this...

With Application
.OnKey "{Enter}", "MyMacro"
.OnKey "~", "MyMacro"
End With

The macro MyMacro will have to mimic a normal enter but that is just
seleting the cell you want... Check out this link...

http://msdn.microsoft.com/library/de...HV05203370.asp
--
HTH...

Jim Thomlinson


"joeeng" wrote:

How can I code vba to determine if the selection change on a worksheet was
the result of pressing the ENTER key?