Читать книгу Excel Macros For Dummies онлайн
37 страница из 60
Figure1-7
2 Select the Button Form Control from the drop-down list that appears.
3 Click the location where you want to place your button.When you drop the button control onto your worksheet, the Assign Macro dialog box, shown in Figure 1-8, opens and asks you to assign a macro to this button.
4 Select the macro you want to assign to the button and then click OK.
ssss1 You can find the form controls on the Developer tab.
ssss1 Assign a macro to the newly added button.
FORM CONTROLS VERSUS ACTIVEX CONTROLS
The Insert command on the Developer tab shows both form controls and ActiveX controls (refer to Figure 1-7). Although they look similar, they’re quite different. Form controls are designed specifically for use on a worksheet, and ActiveX controls are typically used on Excel user forms (custom dialog boxes that are beyond the scope of this book). As a general rule, you should always use form controls when working on a worksheet unless there is a specific function that only ActiveX controls have. This is because form controls need less overhead, so they perform better, and configuring form controls is far easier than configuring their ActiveX counterparts.