Macros

Macro - series of instructions that are stored for later retrieval

  1. Creating/Recording a Macro
    1. Close any workbooks that may be open.
    2. Open a New Workbook.
    3. Turn on the Macro Recorder:
      1. Tools|Macro|Record New Macro
      2. Assign a name to your macro and select a Shortcut key; for example - UniversityName and U
    4. Notice that the word "Recording" appears in the Status bar and the Stop Recording button floats above the document window
    5. Press: CTRL+HOME
    6. Enter your data: New Mexico Highlands University | University Dr. | Las Vegas, NM 87701 <ENTER>
    7. Select cell range from A1 to A3;
      1. click the Bold button,
      2. click the italic button,
      3. select Times New Roman from the Font drop-down list,
      4. slect 12 from the Font Size drop-down list,
      5. Select cell A1 and select 14 from the Font Size drop-down list.
    8. To stop recording, click the STOP button.
  2. Playing Back/Using a Macro
    1. If you gave your macro a shortcut key, you can press it to run the macro
    2. Choose Tools|Macro|Macros|double-click your macro name
  3. Reviewing/Editing a Macro
    1. Choose Tools|Macro|Macros|Edit
    2. Edit the Visual BASIC code and close

To add a button for a macro

  1. Open the worksheet that you want to add the button to.
  2. Make sure the Forms toolbar is displayed
  3. On the Forms toolbar, click the button for the control you want
  4. ON the worksheet, drag the control to the size you want and rename the button.
  5. Select the macro you want to run when you click the button in the Macro name box