Customizing or combining controls

A very handy feature lets you customize a control and then save it for future use. You can, for instance, create a CommandButton control that's set up to serve as an OK button. For example, you can set the following properties: Width, Height, Caption, Default, and Name. Then drag the customized CommandButton to the Toolbox. This will create a new control. Right-click 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 want and then select them both and drag them to the Toolbox. In this case, you can use this new Toolbox control to add two customized buttons in one fell swoop.

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

Tip You might want to place your customized controls on a separate page in the Toolbox. This lets you export the entire page so you can share it with other Excel users. To export a Toolbox page, right-click the tab and select Export Page.

The companion CD-ROM contains a PAG file (named ® ) that contains some customized controls. You can import this file as a new page in your Toolbox. Right-click a tab and select Import Page. Then locate the PAG file. Your Toolbox will resemble Figure 13-14. The new controls are: an exclamation point image, a "critical" red * image, a question mark image, an information image, an OK and Cancel button, a Frame with four OptionButton controls, a TextBox and a Spinner, and six CheckBox controls.

CD-ROM

f"^WcrcnftVlHilllatfc BroH ?Ji

wi wrrl (U»»^

dftt||

■ ilj

D) Nb Ui fewn Ihhu

c Mq ■

m timta ud >l

* ■

bfl j * . .-. ft * •

' ti i k£

'j T , ■>

- si Sdi'.cid jtu a uhtal

1 * s..

© V

4j

1

Jj ]

lk8

" jm-t'-i

lit'-» %-pw i

MbilyM

r J™*.-,-

* Li LJ J! Isi

MM

aaESJc

JII Ullll

Figure 13-14: The Toolbox, with a new page of controls.

Figure 13-14: The Toolbox, with a new page of controls.

0 0

Post a comment