Table of contents
TOC
Collapse the table of content
Expand the table of content

Cancel Property (Microsoft Forms)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Returns or sets a value indicating whether a command button is the Cancel button on a form. Syntaxobject. Cancel [= Boolean ] The Cancel property syntax has these parts:

PartDescription
objectRequired. A valid object.
BooleanOptional. Whether the object is the Cancel button.

Settings The settings for Boolean are:

ValueDescription
TrueThe CommandButton is the Cancel button.
FalseThe CommandButton is not the Cancel button (default).

Remarks A CommandButton or an object that acts like a command button can be designated as the default command button. ForOLE container controls (Windows only), the Cancel property is provided only for those objects that specifically behave as command buttons. Only one CommandButton on a form can be the Cancel button. Setting Cancel to True for one command button automatically sets it to False for all other objects on the form. When a CommandButton's Cancel property is set to True and the form is the active form, the user can choose the command button by clicking it, pressing ESC, or pressing ENTER when the button has thefocus. A typical use of Cancel is to give the user the option of canceling uncommitted changes and returning the form to its previous state. You should consider making the Cancel button the default button for forms that support operations that can't be undone (such as delete). To do this, set both Cancel and the Default property to True.

© 2018 Microsoft