18.11.2014 Views

Microsoft Office

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using UserForm Controls<br />

in a Worksheet<br />

Chapter 41 presented an introduction to UserForms. If you like the idea of<br />

using dialog box controls — but don’t like the idea of creating a custom<br />

dialog box — this chapter is for you. It explains how to enhance your<br />

worksheet with a variety of interactive controls, such as buttons, ListBoxes,<br />

and OptionButtons.<br />

Why Use Controls on a Worksheet?<br />

The main reason to use controls on a worksheet is to make it easier for the user<br />

to provide input. For example, if you create a model that uses one or more input<br />

cells, you can create controls to allow the user to select values for the input cells.<br />

Adding controls to a worksheet requires much less effort than creating a dialog<br />

box. In addition, you may not have to create any macros because you can link a<br />

control to a worksheet cell. For example, if you insert a CheckBox control on a<br />

worksheet, you can link it to a particular cell. When the CheckBox is checked,<br />

the linked cell displays TRUE. When the CheckBox is not checked, the linked<br />

cell displays FALSE.<br />

Figure 42.1 shows a simple example that uses three types of controls: a<br />

Checkbox, OptionButtons, and a ScrollBar.<br />

ON the CD-ROM<br />

This workbook is available on the companion CD-ROM. The<br />

file is named mortgage loan.xlsm.<br />

IN THIS CHAPTER<br />

Why use controls on a<br />

worksheet?<br />

Using controls<br />

The Controls Toolbox controls<br />

733

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!