Using Frames
Not all forms are the same size or, said in another way, some forms display more controls than others. Having too many controls on a form can create confusion, hence the standard practice of organizing controls in groups. Just think of the Alignment dialog box in Excel or the Page Setup dialog box—not only are the controls separated in groups, but they also have several tabs to group related controls together.
The containers in which these clusters of controls are organized are known as Frames. In this recipe, we will be adding a Frame to our UserForm.
Getting ready
Make sure that UserForms.xlsm
is still open. UserForm1 should be visible, and both the Project Explorer and the Properties window should be visible on the left of the VBA Editor.
How to do it…
To insert a Frame, do the following:
- Under normal circumstances, we would have inserted the Frame before creating any controls. Since we first had to understand the basic principles...