SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 144 | Next

Jim DeMarco

"Pro Excel 2007 VBA"


The user??™s task is to call the customer and find out if they??™ve heard of ???the Widget??? and
whether they??™re interested in finding out more about the product. If the customer is interested,
the user will mark that on the form as well so sales can follow up.
nNote The example files and source code for this book are available to readers at www.apress.com in the
Downloads section of this book??™s home page.
Designing the Form
From the sample files for this book, open the workbook named UserForm.xlsm. This file contains
the Customer Survey database shown in Figure 4-1. Our custom form will collect and
save its data to this table.
Figure 4-1. The Customer Survey database
133
C H A P T E R 4
Open the VBE, and add a UserForm to the project. You can do this by choosing Insert ?¤
UserForm, or you can right-click in the Project Explorer window and choose Insert ?¤
UserForm, as shown in Figure 4-2.
Figure 4-2. Adding a UserForm to the project
A new empty UserForm named UserForm1 is added to the project, as shown in Figure 4-3.
CHAPTER 4 n USERFORMS 134
Figure 4-3. New UserForm with Toolbox and Property Sheet displayed
Along with the UserForm, you??™ll see the Toolbox window, which contains a palette of controls
to use, and the UserForm Property Sheet, where you can rename your form and modify
various settings.
The Toolbox controls are described in Table 4-1.
UserForm Toolbox Controls
Table 4-1. UserForm Toolbox Objects
Toolbox Button Command Description
Select Objects Resizes or moves a control on a form.


Pages:
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156