Saving and Using an Excel 2010 Macro-Enabled Workbook - dummies

Saving and Using an Excel 2010 Macro-Enabled Workbook

By Diane Koers

When working with macros in Excel 2010, you save and open workbooks in a new macro-enabled workbook format (.xlsm) that provides added security. When you create a macro, you must use a macro-enabled format to save your workbook or the macro won’t be saved.

If you open a macro-enabled workbook, a Security Warning message states that the workbook contains macros. This protects you from possible harm — some macros might contain viruses or other hazards. You can choose to enable the content if the workbook is from a trusted source.

Save a macro-enabled workbook

Follow these steps to save a macro-enabled workbook:

  1. Click the File tab and then choose Save As.

    The Save As dialog box appears.

  2. Enter a name and select a location for your workbook.

  3. Click the Save as Type drop-down arrow.

    A list of file types appears.

  4. Select Excel Macro-Enabled Workbook.

    Excel adds the .xlsm extension to the filename.

  5. Click Save.

If you create a macro in a workbook and neglect to save the workbook as a macro-enabled workbook, you see a warning message telling you that the macro will not be retained.


Open a macro-enabled workbook

To open a macro-enabled workbook, follow these steps:

  1. Open a workbook containing a macro in the same way you open any other workbook.

    The workbook opens as usual, but a Security Warning message appears below the Ribbon.

  2. If you know where the macro originated, click the Enable Content button.

    The Security Warning message closes, and you’re free to use the macros in that workbook.