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 51 | Next

Jim DeMarco

"Pro Excel 2007 VBA"

Excel names new forms UserForm1, UserForm2, and so on, as they
are added. They can be renamed as needed.
UserForms are inserted into your project by choosing Insert ?¤ UserForm or by rightclicking
an object in the Project Explorer and choosing Insert ?¤ UserForm from the pop-up
menu, as shown in Figure 1-33.
Figure 1-33. A new UserForm inserted in the VBE
When a new UserFormis inserted, the Toolbox window is also displayed. The Toolbox
identifies the different controls that you can add to your forms.
CHAPTER 1 n THE MACRO RECORDER AND CODE MODULES 36
nNote If the Toolbox is not displayed, click View ?¤Toolbox to display it.
The Toolbox (Figure 1-34) is customizable. The following are some of the customization
options you have:
??? Adding pages to the Toolbox
??? Moving controls from one page to another
??? Renaming pages
??? Adding other controls, including ActiveX controls, to the Toolbox
??? Copying customized controls from the form into the Toolbox
nTip The OK and Cancel buttons are special cases of a command button. If you add OK and Cancel templates
to the Toolbox, you can quickly add them to other forms.
Figure 1-34. The Toolbox window
Toolbox Window Elements
The Toolbox window contains the following controls:
Select Objects: This is the only item in the Toolbox that doesn??™t draw a control. When you
select it, you can only resize or move a control that has already been placed on a form.
Label: This displays text that the user cannot change, such as a form heading.


Pages:
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63