Читать книгу Excel VBA Programming For Dummies - Dick Kusleika - Страница 37

Saving Workbooks That Contain Macros

Оглавление

If you store one or more macros in a workbook, the file must be saved as a macro-enabled file type. In other words, the file must be saved with an XLSM extension rather than the normal XLSX extension.

When you save a workbook that contains a macro, the Excel might try to save it as Excel Workbook (*.xlsx), a format that cannot contain macros. Unless you change the file format to Excel Macro-Enabled Workbook (*.xlsm), Excel displays the warning shown in Figure 2-5. You need to click No and change the file type to Excel Macro-Enabled Workbook (*.xlsm).


FIGURE 2-5: If your workbook contains macros, and you attempt to save it in a macro-free file format, Excel warns you.

Excel VBA Programming For Dummies

Подняться наверх