How to: Accept User Input and Display the Values of Controls on a Form
|Outlook Developer Reference|
The following example demonstrates the values that the different types of controls can have by displaying the Value property of a selected control. The user chooses a control by pressing TAB or by clicking on the control. Depending on the type of control, the user can also specify a value for the control by typing in the text area of the control, by clicking one or more times on the control, or by selecting an item, page, or tab within the control. The user can display the value of the selected control by clicking the appropriately labeled CommandButton.
To use this example, copy this sample code to the Script Editor of a form. To run the code you need to open the form so the Open event will activate. Make sure that the form contains:
- A CommandButton named CommandButton1.
- A TextBox named TextBox1.
- A CheckBox named CheckBox1.
- A ComboBox named ComboBox1.
- A CommandButton named CommandButton2.
- A ListBox named ListBox1.
- A MultiPage named MultiPage1.
- Two OptionButton controls named OptionButton1 and OptionButton2.
- A ScrollBar named ScrollBar1.
- A SpinButton named SpinButton1.
- A TabStrip named TabStrip1.
- A TextBox named TextBox2.
- A ToggleButton named ToggleButton1.