spot_img

Assign macro to a button

In this lesson you can learn how to assign macro to a button (or other object).First let’s prepare some button. Go to Ribbon > Insert > Shapes and select Rectangle.
Insert Rectangle ShapeThen insert the shape in the workbook and name it (if you want).Insert Rectangle Button

Now right-click on this button and click Assign macro.

Assign macro

Dialog box appears. Choose the macro which you want to assign.

Assign Example Macro

Macro is now assigned to the button. To run the macro just click the button.

To unassigned macro right-click on the button. Click Assign macro from the list. Dialog box appears. To unassigned the macro just erase macro’s name and leave it blank.

Unassign Macro

Template

You can download the Template here – Download
spot_img
Previous articleAvoid Errors Using IFERROR-Everyone Should Know
Next articleLinking Text Box To A Specific Cell