Chapter 20. Advanced UserForms

Lesson 18 introduced you to UserForms and showed how to add controls to your form. Lesson 19 provided several examples of UserForms with frequently used controls to help you gather and store information. This lesson takes an expanded look at how you can get more out of UserForms by tapping into their capacity for supporting some interesting and useful operations.

THE USERFORM TOOLBAR

In the Visual Basic Editor, there's a handy toolbar for working with UserForms, aptly named the UserForm toolbar, shown in Figure 20-1. To display it in the VBE, from the menu bar click View

THE USERFORM TOOLBAR
FIGURE 20-1

Figure 20.1. FIGURE 20-1

The UserForm toolbar has eight features:

  • Bring to Front — Brings the selected control to the front of the other controls.

  • Send to Back — Sends the selected control to the back of the other controls.

  • Group — Groups the selected controls.

  • Ungroup — Ungroups the selected grouped controls.

  • Alignments — The small drop-down arrow to the right of the Alignments icon provides options for aligning the selected controls by their Rights, Lefts, Centers, Tops, Middles, Bottoms, and To Grid.

  • Centering — Centers the selected controls horizontally or vertically on the UserForm.

  • Same Size — Sizes the selected controls to be of the same Height, Width, or Both.

  • Zoom — Displays the UserForm ...

Get Excel® VBA: 24-Hour Trainer now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.