Form controls make spreadsheets an interactive part of the user interface. When you create a form control, you can activate it to behave in a specific way. You can also customize the appearance and behavior of form controls by setting control properties.
In this section, you'll learn about
creating controls on a spreadsheet
customizing and managing controls on a spreadsheet
Creating controls on a spreadsheet
You can add the following controls to a spreadsheet:
Control Description
Push button-performs a specific action when clicked
Check box-provides two choices: Yes when enabled and No when disabled
Radio button-typically used in a mutually exclusive list where only one radio button can be selected at a time
Group box-usually contains other controls, such as radio buttons or check boxes
List box-lets a user browse values using a scroll bar
Combo box-creates a drop-down list box from which a user can make choices from
Label text-allows you to add static text near a control
Vertical scroll bar-lets a user scroll through a list of values by clicking arrows
Spin control-lets a user choose a value by clicking arrows and selecting a value
Edit box-lets a user type text
The way controls are activated varies depending on the action they incur. When you specify a source block to appear in a control (for example, a list box), each row in the block you specify becomes one item in a list. If you want to make a control functional, you must specify the appropriate information in a different area depending on the control.
You can attach a macro to a form control that runs when a user activates the control. For example, a user can click a button that runs a macro to perform a calculation. You can attach a macro to all form controls except group boxes and labels. For information about creating macros, see "Using macros."
Form controls can also be attached to the Internet. For example, a button can launch a browser linked to a Web site. For information about using Quattro Pro notebooks with the Internet, see "Working with the Internet."
As well, you can link a custom dialog box to a form control so that when a user executes a macro, the specified dialog box displays.
To add a form control to a spreadsheet
1 Click Insert Form control, and click a form control.
2 Click where you want the control to display.
3 Drag diagonally until the control is the desired size.
Tip
To create a form control of the default size, position the pointer where you want the control to display, and click.
To attach a macro to a form control
1 Select a form control.
2 Right-click the control, and click Properties.
3 Click the Macro tab.
4 Type the macro command name or location in the Enter macro box.
You must enclose the macro command name with braces {}.
To attach a form control to the Internet
1 Select a form control.
2 Right-click the control, and click Properties.
3 Click the Macro tab.
4 Click Link to URL.
5 Type the Internet address in the URL box.
To display a dialog box from a form control
1 Select a form control.
2 Right-click the control, and click Properties.
3 Click the Macro tab.
4 Click Execute dialog.
5 In the Execute dialog box, choose a dialog box from the Active dialog list.
6 Type a cell reference in the Result cell box.
7 Type a cell reference in the Values range box.
Customizing and managing controls on a spreadsheet
You can change both the border color and border width of a form control. As well, you can change the label of a form control to better describe its role in the spreadsheet.
When you add a form control to a spreadsheet, Quattro Pro assigns it a default object name in the format ControlName1, ControlName2, and so on. The default object name is the control label.
For controls that do not have labels (list boxes, combo boxes, scroll bars, and spin controls), you can add a label beside the original control.
The object name is the name used to reference the form control in macros, link commands, and in spreadsheet functions. You can change the object name of a form control the same way you change the object name of other OLE objects.
You can enable protection on a form control. Enabling protection prevents a control from being changed or deleted by other users when protections have been set higher up at the sheet level. For information about protecting spreadsheets and cells, see "Protecting data."
You can print a spreadsheet without printing a form control.
To change the border of a form control
1 Select a form control.
2 Right-click the control, and click Properties.
3 Click the Border color tab.
4 Click a color on the color palette.
5 Click the Box type tab.
6 Enable a Box type option.
If you want to create a shadow behind the control, enable the Drop shadow check box.
To change the label of a form control
1 Select a form control.
2 Right-click the control, and click Properties.
3 Click the Label text tab.
4 Type a new label in the Enter text box.
To add a label beside a form control
1 Click Insert Form control Label text.
2 Drag the label to a spot near a form control.
3 Right-click the label, and click Properties.
4 Click the Label text tab.
5 Type a label in the Enter text box.
Tip
To create a control of the default size, put the cursor in the desired position and click once.
To change the object name of a form control
1 Select a form control.
2 Right-click the control, and click Properties.
3 Click the Object name tab.
4 Type a new name in the Object name box.
To enable protection on a form control
1 Select a form control.
2 Right-click the control, and click Properties.
3 Click the Protection tab.
4 Enable the Locked check box.
To print a spreadsheet without printing a form control