Run excel macro using an icon
Run excel macro is very easy. There are many
ways to run the macro. Given below are some methods which you
could use to run the macro:
- Go to menu, click on tools, --> macro --> macros. When the
Macro dialog box appears, select the macro and click on the run button.
- Activate the control toolbox toolbar. Click on the icon to create a button.
Draw the button to the desired size. Point the mouse at the edge of the button and click
on the right mouse button. In the pop-up menu, select assign macro and select the macro
to attach to this button. Click OK and click away from the button. The button is now assigned
to the button. You can use the assign macro method on most the objects in Excel
such as pictures, auto shape, etc.
- Use a short cut key (e.g. Press the CTRL
key together with a character) to run excel macro. You can set
up the short cut key when you start recording a macro. If you have
created the macro, you can set the short cut key by going to menu,
click on tools, --> macro --> macros. When the Macro dialog box appears,
select the macro and click on the option button.
- In the following section, we will show you how to assign the macro
to an icon so that the macro can be run by clicking on the icon. We
will use the macro which we have created in the tutorial
�record a macro�
for this tutorial.
- Click on the right mouse button.
- Select Customize.
- Go to the Command Tab, select the Category called Macros.
- Go to list on the right side of the dialog box called
Commands. Select Custom Button / Icon.
- Drag it to the formatting toolbar.
- To modify the button image, click on the modify selection
on the Customize Dialog Box, go to change button image. Select your preferred image.
- Go to modify selection again and select assign Macro.
- Select the Macro named �Custom_Num_Format� and click OK.
- Close the Customize Dialog Box.
- Enter some numbers into the worksheet and test out your new macro.
- Once you have done the above steps, you will be able to run excel macro using the icon.