Visual Basic for Applications/Recording Macros

This lesson introduces recording macros.

Objectives and Skills
Objectives and skills for recording macros include:
 * Generating code by recording macros
 * Inserting code into an existing procedure by using the Macro Recorder
 * Comparing and contrasting relative and absolute references by using the Macro Recorder

Readings

 * 1)  Macro (computer science)
 * 2) Microsoft: Create a Macro
 * 3) Microsoft: Create or Delete a Macro
 * 4) Excel-Easy: Macro Recorder

Multimedia

 * 1) YouTube: Recording Macros in Excel

Activities

 * 1) Record a macro.
 * 2) Using Excel, record a macro that enters your name in the current cell and formats it as italic. Name the macro something similar to EnterMyName and assign it to any key you wish.
 * 3) Experiment with running your macro using the keyboard shortcut you created as well as the Macros dialog box.
 * 4) Edit your macro to ensure that it doesn't have any extraneous statements in it. Try commenting out one or more lines of code using an apostrophe at the beginning of the line to identify exactly what each line of code does.
 * 5) Record a macro.
 * 6) Using Excel, record a macro that enters a calculation in the current cell and formats it as bold. Name the macro something similar to EnterCalculation and assign it to any key you wish.
 * 7) Experiment with running your macro using the keyboard shortcut you created as well as the Macros dialog box.
 * 8) Edit your macro to ensure that it doesn't have any extraneous statements in it. Try commenting out one or more lines of code using an apostrophe at the beginning of the line to identify exactly what each line of code does.
 * 9) Record a macro.
 * 10) Using Excel, record a macro that enters a value in the current cell and then a formula in a neighboring cell that performs a calculation using the first cell.  Name the macro something similar to EnterFormula and assign it to any key you wish.
 * 11) Experiment with running your macro using the keyboard shortcut you created as well as the Macros dialog box.  Does the macro use relative or absolute cell references?
 * 12) Edit your macro to ensure that it doesn't have any extraneous statements in it. Try commenting out one or more lines of code using an apostrophe at the beginning of the line to identify exactly what each line of code does.
 * 13) Record a macro using relative references.
 * 14) Search the Internet for information on how to record a macro in Excel using relative cell references rather than absolute cell references.
 * 15) Repeat the activities above, this time first setting Excel to record using relative cell references.