How to Run Macro By Clicking a Button
While the shape is something you can format and play with it, a button has a standard format. A macro can also be assigned to a button for easy use and then can run the macro by simply clicking that button.
Step 1: Go to the Developer Tab on the Ribbon
Step 2: In the Controls group, click on the Button Tool
Step 3: Click on the Excel Sheet and Fill the Details in the Dialog box
Now, click anywhere on the Excel sheet. As soon as you do this, the Assign Macro dialog box would be opened.
Step 4: Select the Macro you want to Assign and Click OK
Select the macro you want to assign to that button and fill in the other options. Then click on OK.
Step 5: Preview the Shape
After that, a rectangular button can be seen on the sheet, and ready to be used.
Step 6: Format the Button
The button which appears on the sheet has default settings, and you can’t format it like the color, or shape of the button.
However, the text which appears on the button can be changed. Just a right-click on the button and a dialog box would open. Click on Edit Alt Text and change the text.
Macros In Excel With Example
In Microsoft Excel, where spreadsheets are the playground, we often encounter the repetitious demands of certain tasks. These are the tasks that seem to crop up again and again, capturing our attention with relentless persistence. However, in this age of technological progress, a silent hero steps forward to liberate us from this ceaseless cycle – the unassuming yet powerful “Macro.” Think of macros as Excel’s covert operatives for automation, working quietly in the background to spare us the laborious duty of manually carrying out repetitive tasks. They are the unsung champions of efficiency, gifting us the remarkable ability to accomplish in mere moments what would otherwise devour hours of our valuable time. But what exactly is a macro? At its essence, a macro is a sequence of actions carefully recorded by Excel, patiently waiting for our directive to execute a specific task. Picture this: every mouse click and keystroke, discreetly tucked away within the confines of a macro, poised to spring into action at our command, ready to perform its enchantment.