MS Excel 2003 - Lesson 8: Excel Macro - Automate complex tasks

A macro is a program that includes commands and functions that are executed every time you need it. Macros can automatically perform operations and reduce steps to complete regular tasks.

A macro is a program that includes commands and functions that are executed every time you need it. Macros can automatically perform operations and reduce steps to complete regular tasks.

The simple way to create an Excel Macro is to have the Excel activity record and store it as a macro. Macros can be reworked or changed at any time.

Create macros in Excel 2003

- From the Tools menu, select Macro and click Record New Macro .

- Record dialog box Macro is displayed, enter the name in the Macro name section

MS Excel 2003 - Lesson 8: Excel Macro - Automate complex tasks Picture 1MS Excel 2003 - Lesson 8: Excel Macro - Automate complex tasks Picture 1

- In the Description: default field, it is ' Macro recorded 8/26/2006 by SmartPoint ' (ie including the date and user name. If desired, you can change it)

- To start recording, click OK

- Perform actions to record macros, these actions can be a combination of multiple commands in Excel.

- To stop recording, from the Tools menu, select Macro and click Stop Recording .

Assign a shortcut to the macro

- From the Tools menu, select Macro and click Macros .

- Macros dialog box appears, select the macro name (if previously saved) to assign a shortcut.

MS Excel 2003 - Lesson 8: Excel Macro - Automate complex tasks Picture 2MS Excel 2003 - Lesson 8: Excel Macro - Automate complex tasks Picture 2

- Click the Options button to display the Macro Options dialog box

- At the Shortcut key , enter a character after the Ctrl + box (eg Ctrl + I ). This shortcut will be used to call macros.

- Click OK to return to the Macro dialog box

- Click the Cancel button to skip the dialog box.

Run macros using command tools

- From the Tools menu, select Macro and click Macros .

- The Macro dialog box appears, in the Macro name section, select the macro name you want to run

- Click the Run button. Note : If you want to change or delete macros, just click the Edit or Delete button

Run macros with keyboard shortcuts

- Press Ctrl +? (with ? is the assigned character)

Create a command button and assign Excel macro

- If the Forms toolbar is not displayed, right-click on the toolbar, from the pop-up menu, select Forms .

- To create a button, from the Forms toolbar click the Button icon

MS Excel 2003 - Lesson 8: Excel Macro - Automate complex tasks Picture 3MS Excel 2003 - Lesson 8: Excel Macro - Automate complex tasks Picture 3

- Then use the mouse to drag to the position you want, then appear a + sign and you can drag to arbitrary size

- When you release the mouse button, the Assign Macro dialog box appears.

MS Excel 2003 - Lesson 8: Excel Macro - Automate complex tasks Picture 4MS Excel 2003 - Lesson 8: Excel Macro - Automate complex tasks Picture 4

- Click the Record button, the Record Macro dialog box appears

- From Macro name: enter the name of the macro to call

- Click the OK button

- Then, the macro is saved normally, click the command button, select Edit Text from the pop-up menu

- To run the macro, click the newly created button.

Change the button name

- Double click the button, then the button name is highlighted

- Type in a new name and click on the worksheet area

Delete the button

- Click the button and press the Delete key

4 ★ | 1 Vote