18.11.2014 Views

Microsoft Office

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Part VI<br />

Programming Excel with VBA<br />

FIGURE 42.1<br />

This worksheet uses UserForm controls.<br />

Adding controls to a worksheet can be a bit confusing because Excel offers two different sets of controls,<br />

both of which you access by choosing Developer ➪ Controls ➪ Insert.<br />

n Form controls: These controls are unique to Excel.<br />

n ActiveX controls: These controls are a subset of those that are available for use on UserForms.<br />

Figure 42.2 shows the controls that appear when you choose Developer ➪ Controls ➪ Insert.<br />

To add to the confusion, many controls are available from both sources. For example, a control named<br />

ListBox is listed in both the Forms controls and the ActiveX controls. However, they are two entirely different<br />

controls. In general, the Forms controls are easier to use, but the ActiveX controls provide more flexibility.<br />

NOTE<br />

This chapter focuses exclusively on the ActiveX controls.<br />

FIGURE 42.2<br />

Excel’s two sets of worksheet controls.<br />

734

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!