Page 21 - Excel Progamming Weekend Crash Course
P. 21
540629 FM.qxd 9/2/03 4:10 PM Page xviii
xviii Contents
SESSION 19–Creating Custom Dialog Boxes with User Forms .........................239
Overview of User Forms .......................................................................239
Form Designer Basics ..........................................................................240
Designing the Interface ......................................................................241
Setting Properties .............................................................................242
Form Properties .................................................................................243
Appearance Properties .......................................................................243
Behavior and Position Properties ..........................................................244
Form Methods ....................................................................................245
Displaying, Using, and Hiding Forms .....................................................246
A Simple User Form Example ................................................................247
SESSION 20–Controls for User Forms ..........................................................251
A Summary of Controls ........................................................................251
Common Control Properties ..................................................................252
User Form Control Details .....................................................................253
The CheckBox Control ........................................................................253
The ComboBox Control .......................................................................253
The CommandButton Control ...............................................................256
The Frame Control .............................................................................258
The Label Control .............................................................................258
The OptionButton Control ...................................................................258
The RefEdit Control ...........................................................................260
The TextBox Control ..........................................................................262
The ToggleButton Control ...................................................................263
SUNDAY.................................................................................................268
PART V–Sunday Morning ....................................................................270
SESSION 21–Advanced User Form Techniques ..............................................271
Using Control Events ...........................................................................271
Advanced Form Design ........................................................................273
The Form Grid ..................................................................................273
Control Placement and Alignment Tools ..................................................274
Overlapping Controls and the Z-Order .....................................................278
Focus and the Tab Order .....................................................................278
SESSION 22–A User Form Example ..............................................................283
Planning the Project ...........................................................................283
Part 1: Creating the Workbook ..............................................................285
Part 2: Designing the Form ...................................................................285
Part 3: Writing the Initialization Code ...................................................286
Part 4: Restricting Zip Code Entry to Digits .............................................287
Part 5: Writing the Data Validation Code .................................................288
Part 6: Completing the Project ..............................................................289
Part 7: Testing the Project ....................................................................292