Determines whether a command button is the Cancel button on a form.
[form.]commandbutton.Cancel[ = boolean ]
The Cancel property settings are:
True The command button is the Cancel button.
False (Default) The command button isn't the Cancel button.
Use the Cancel property to give a user the option of canceling uncommitted changes and returning the form to its previous state.
Only one command button on a form can be the Cancel button. When the Cancel property is set to True for one command button, it is automatically set to False for all other command buttons on the form. When a command button's Cancel property is True and the form is the active form, the user can choose the command button by clicking it, pressing the Esc key, or pressing Enter when the button has the focus .
Tip For a form that supports irreversible operations, such as deletions, it's a good idea to make the Cancel button the default button. To do this, set both the Cancel property and the Default property to True.
KeyDown, KeyUp Events
Chapter 3, "Creating and Using Controls"