◄Example► ◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── ' This example shows how to use the Cancel property. When the first command ' button is selected or the Esc key is pressed, the Click event for the ' command button is executed. ' To try this example: ' 1. Choose New Project from the File menu ' 2. Choose New Form from the File menu to create a form with two command ' buttons ' 3. Set the first command button's Cancel property to True ' 4. Press Alt+F4 to return to the programming environment ' 5. Copy the code example below to the form module ' 6. Press F5 to run the example SUB Command1_Click () Command1.caption = "Cancel" END SUB SUB Command2_Click () Command2.Caption = "Not Cancel" END SUB