Workbook contains a user form or class module

The workbook that you are opening contains a user form or class module in the VBA project that is associated with the workbook. This may be a security risk because user forms and class modules may contain potentially unsafe macros.

If the macro security level is set to Disable all macros with notification or Disable all macros except digitally signed macros, you have the option to remove the VBA project from the workbook. You should choose to keep the VBA project only if you trust the source of this workbook. If you choose to remove the VBA project from your workbook, the VBA project is not merely disabled, it is actually deleted from the workbook.

If the macro security level is set to Disable all macros without notification, Microsoft Office Excel automatically removes the VBA project from the workbook. If you trust the source of this workbook, and you want to keep the VBA project, you can close the workbook without saving any changes. Then you must set your macro security level to Disable all macros with notification, so that you will be prompted to keep or remove the VBA project when you open the workbook again.

You should avoid setting the security level to Enable all macros (not recommended, potentially dangerous code can run).

To change the macro security settings in Excel, do the following:

On the Developer tab, in the Code group, click Macro Security.

In the Macro Settings category, under Macro Settings, click Enable all macros (not recommended, potentially dangerous code can run), and then click OK.

Note: To help prevent potentially dangerous code from running, we recommend that you return to any of the settings that disable all macros after you finish working with macros.

Note: You will see this alert only if the macro security level is set to any option that disables all macros. If the security level is Enable all macros (not recommended, potentially dangerous code can run), or the Trust access to the VBA project object model check box is selected, Excel retains the VBA project and loads it when the workbook is opened.