Microsoft Office Tutorials and References
In Depth Information
Customizing the Toolbox
Rather than use the actual name of the UserForm, it’s preferable to use Me . Then, if you
change the name of the UserForm, you won’t need to replace the references in your
Customizing the Toolbox
When a UserForm is active in the VBE, the Toolbox displays the controls that you can add to the
UserForm. If the Toolbox isn’t visible, choose View➜Toolbox to display it. This section describes
ways to customize the Toolbox.
Adding new pages to the Toolbox
The Toolbox initially contains a single tab. Right-click this tab and select New Page to add a new
tab to the Toolbox. You can also change the text displayed on the tab by selecting Rename from
the shortcut menu.
Customizing or combining controls
A very handy feature lets you customize a control and then save it for future use. You can, for
example, create a CommandButton control that’s set up to serve as an OK button. Set the
following properties to customize the CommandButton: Width , Height , Caption , Default , and
Name . Then drag the customized CommandButton to the Toolbox to create a new control.
Rightclick the new control to rename it or change its icon.
You can also create a new Toolbox entry that consists of multiple controls. For example, you can
create two CommandButtons that represent a UserForm’s OK and Cancel buttons. Customize
them as you like and then select them both and drag them to the Toolbox. Then, you can use this
new Toolbox control to add two customized buttons in one fell swoop.
This type of customization also works with controls that act as containers. For example, create a
Frame control and add four customized OptionButtons, neatly spaced and aligned. Then drag
the Frame to the Toolbox to create a customized Frame control.
To help identify customized controls, right-click the control and select Customize xxx from the
shortcut menu (where xxx is the control’s name). You see a new dialog box that lets you change
the ToolTip text, edit the icon, or load a new icon image from a file.
You may want to place your customized controls on a separate page in the Toolbox.
This lets you export the entire page so that you can share it with other Excel users. To
export a Toolbox page, right-click the tab and select Export Page.
Search JabSto ::

Custom Search