98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » Macros?
Macros?
Resolved · Low Priority · Version 2003
RE: Macros?
Hi Oliver,
Thank you for your post, welcome to the forum.
In answer to your post;
A macro is a shortcut for performing a series of actions in an Excel worksheet. Macros are useful for automating complex or repetitive tasks, especially if the work is being shared, because it is easier to explain one step (i.e., activate the macro) than it is to explain several steps. Once a macro is created, you can activate it by using the Macro dialog box or by pressing a keyboard combination.
Creating & Recording a New Macro
1. From the Tools Menu choose Macro, Record New Macro
The Record Macro dialog box appears.
2. In the Macro name text box, type a name for the new macro
NOTE: A macro name must begin with a letter and contain no spaces or special characters. Underscores ( _ ) are permissible.
3. OPTIONAL: In the Shortcut key text box, type a letter that will be used to activate the macro
NOTES: The shortcut key must be either an uppercase or lowercase letter. Macro shortcut keys will override any existing shortcuts while the workbook with the macro is open (e.g., copying with [Ctrl] + [C], underlining with [Ctrl] + [U]).
4. To save the macro to the workbook that is currently open, from the Store macro in pull-down list, select This Workbook
To save the macro to a new workbook, from the Store macro in pull-down list, select New Workbook
To save the macro to Excel for use in any workbook, from the Store macro in pull-down list, select Personal Macro Workbook
5. OPTIONAL: In the Description text box, type a summary of the macro's function or any other information
6. Click OK
The Record Macro dialog box closes and the macro begins recording.
7. Perform the exact series of commands you want the macro to accomplish
8. When finished, click the little STOP RECORDING button on the floating Stop Recording Toolbar.
The recording stops and the macro is saved.
Running a Macro
You can run a macro only after it has been created and recorded. Once you have chosen to run a macro, the macro will complete its commands until finished or until you suspend the macro.
WARNING: You should save your workbook before running a macro. If the macro's results are undesirable, you can close the workbook without saving and then reopen it, preserving the state of your workbook before using the macro.
Running a Macro: Menu Option
1. OPTIONAL: If the insertion point is critical, set it in the appropriate location
NOTE: This step will be useful if the macro's commands require you to begin in a specific cell.
2. From the Tools menu click Macro and then Macros
3. From the Macro name scroll box, select the macro you want to run
4. Click RUN
The Macro dialog box closes and the selected macro performs the steps it recorded.
Running a Macro: Keyboard Option
If a macro was given a keyboard shortcut when creating it, you can use the shortcut to run the macro.
1. OPTIONAL: If the insertion point is critical, set it in the appropriate location
NOTE: This step will be useful if the macro's commands require you to begin in a specific cell.
2. Press the appropriate keyboard combination
The macro runs.
Suspending & Resuming a Macro
If you need to, you can suspend (i.e., stop or pause) a macro's progress after you have chosen to run it.
1. After you have started a macro, press [Esc]
The macro is suspended.
2. To complete the macro, run it
The macro resumes where it was suspended.
Deleting a Macro
If you no longer need a macro, you can delete it. Once a macro has been deleted, it is no longer available in any workbook; however, changes that have already been made by the macro will not be undone.
1. From the Tools Menu, click Macro, Macros
The Macro dialog box appears.
2. From the Macro name scroll box, select the macro you want to delete
3. Click DELETE
A confirmation dialog box appears.
4. To confirm the deletion, click YES
The macro is deleted and the Macro dialog box closes.
I hope that has answered your question: regards Pete
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:3D formulas find and replaceAfter you know all the components of a 3D reference, you can change them to suit by using a localised Find and replace crt+f, if need be. |