Microsoft KB Archive/191018

{|
 * width="100%"|

XL98: How to Assign a Macro to an Option Button

 * }

-

The information in this article applies to:


 * Microsoft Excel 98 Macintosh Edition

-

SUMMARY
In Microsoft Excel 98 Macintosh Edition, you can assign a macro to a custom option button so that when the option button is selected, the macro is run.

MORE INFORMATION
To create an option button, make sure the Forms toolbar is visible. To do this, point to Toolbars on the View menu, and then click Forms.

To create an option button and assign a macro to it, follow these steps:


 * 1) On the Forms toolbar, click Option Button and draw the outline of the button on the sheet.
 * 2) Select any cell in the worksheet.
 * 3) COMMAND+click the option button. Click Assign Macro on the shortcut menu that appears.
 * 4) In the Assign Macro dialog box, click the name of the macro that you want to assign to the Option button, and then click OK.

When you click the Option button, the macro will be executed.