Responding to Enter Key

C

Charlie

Hi

Is it possible to start a procedure running whenever enter is hit on a
particular worksheet cell? Obviously I can react to a double click through
the worksheet double click event but is there a "on key" event equivalent?

Thanks

Charlie
 
T

Tom Ogilvy

You can do this,

Sub SetEnter()
Application.OnKey "~", "mymacro"
End Sub

Sub ClearEnter()
Application.OnKey "~"
End Sub

Regards,
Tom Ogilvy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top