View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
DoctorG DoctorG is offline
external usenet poster
 
Posts: 106
Default UserForm Keyboard Control

Hi Rick!

Thanks for the feedback.

Can you tell me how to trap the red "X" on the top-right corner of the form?
Is it the same as the default Cancel key?

"Rick Rothstein" wrote:

For the CommandButton that you want "clicked" when the Enter key is
pressed... set its Default property to True.

For the CommandButton that you want "clicked" when the Esc key is pressed...
set its Cancel property to True.

--
Rick (MVP - Excel)


"DoctorG" wrote in message
...
I am new in Forms design. Can anyone tell me how to activate or specify the
use of Enter and Esc keys in a form so that they represent a positive and
a
negative user choice?