To speed up routine editing and formatting.
To combine multiple commands — for example, to insert a table with a specific size and borders, and with a specific number of rows and columns.
To make an option in a dialog box more accessible.
To automate a complex series of tasks.
You can use the macro recorder to record a sequence of actions, or you can create a macro from scratch by entering code in the Visual Basic Editor (not covered in this tutorial).
On the Tools menu, point to Macro, and then click Record New Macro (as below).
1. In the Macro name box, type a name for the macro (screenshot below).
2. In the Store macro in box, click the template or document in which you want to store the macro.
3. In the Description box, type a description for the macro.
4. If you don't want to assign the macro to a toolbar, a menu, or shortcut keys, click OK to begin recording the macro. When recorded the macro can be run from Tools menu then Macro and clicking Macros.
Note: Excel will only give you the option to assign to a shortcut key (Ctrl+” “) in the above dialog box.
1.To assign the macro to a toolbar or menu, click Toolbars in the Record Macro dialog box above, and then click the Commands tab.
In the Commands box, click the macro you are recording, and drag it to the toolbar or menu you want to assign it to. Click Close to begin recording the macro.
2. To assign the macro to shortcut keys, click Keyboard in the Record Macro dialog box above. In the Commands box, click the macro you are recording. In the Press new shortcut key box, type the key sequence, and then click Assign. Click Close to begin recording the macro.
Perform the actions that you want to include in the macro.
Note: When you record a macro, you can use the mouse to click commands and options, but not to select text. You must use the keyboard to select text. For more information about: Selecting text by using the keyboard
Also: If you give a new macro the same name as an existing built-in command in Microsoft Word and Excel, the new macro actions will replace the existing actions.
Macros can always be run in any document by going to Tools – Macro – Macros – click the Macro and then Run.
Link to this page for everyone's benefit if you found it useful
© IT Buddy 2016