O'Reilly logo

Excel® VBA: 24-Hour Trainer by Tom Urtis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required