Excel 2019 Bible

(singke) #1

983


C H A P T E R


45


Using UserForm Controls in a


Worksheet


IN THIS CHAPTER


Understanding why you may want to use controls on a worksheet
Using controls
Looking at the Controls Toolbox controls

C


hapter 44, “Creating UserForms,” presented an introduction to UserForms. If you like the idea
of using dialog box controls but you don’t like the idea of creating a custom dialog box, this
chapter is for you. It explains how to enhance your worksheet with a variety of interactive
controls, such as buttons, list boxes, and option buttons.

Understanding Why to Use Controls on a Worksheet


The main reason to use controls on a worksheet is to make it easier for the user to provide input.
For example, if you create a model that uses one or more input cells, you can create controls to
allow the user to select values for the input cells.

Adding controls to a worksheet requires much less effort than creating a dialog box. In addi-
tion, you may not have to create any macros because you can link a control to a worksheet cell.
For example, if you insert a CheckBox control on a worksheet, you can link it to a particular
cell. When the CheckBox is checked, the linked cell displays TRUE. When the CheckBox is not
checked, the linked cell displays FALSE.

Figure 45.1 shows an example that uses three types of controls: a Checkbox, two sets of
OptionButtons, and a ScrollBar. The user’s selections are used to display a loan amortization
schedule on another worksheet. The workbook is interactive, but it uses no macros.

Excel® 2019 Bible, First Edition. Michael Alexander, Dick Kusleika and John Walkenbach.
© 2019 John Wiley & Sons, Inc. Published 2019 by John Wiley & Sons, Inc.

Free download pdf