Macro High Security Warning for User Defined-Functions Appears


When you start Microsoft Excel or open a workbook, you may receive an error message similar to the following:
Macros in this workbook are disabled because the security level is high, and the macros have not been digitally signed or verified as safe. To run the macros, you can either have them signed or change your security levels. Click Help for more information.
When you change something in a workbook or force a recalculation, some cells display the #NAME? error value.


By default, Excel sets macro security to
High. This prevents Visual Basic for Application subprocedures and functions that have not been digitally signed from running. Cells that have user-defined functions display the #NAME? error value.


To work around this behavior, use either of the following methods.

Method 1: Add a digital signature to the macro

Excel runs macros that are signed by a trusted source. Obtain a digital signature, and then add the digital signature to the macro. To add the digital signature:
  1. Open the file that contains the macro project that you want to sign.
  2. On the Tools menu, point to
    Macro, and then click Visual Basic Editor.
  3. In Project Explorer, select the project that you want to sign.
  4. On the Tools menu, click Digital Signature.
  5. Click Choose, select the certificate, and then click OK two times.

Method 2: Change the security level

To change the security level of macro virus protection:
  1. On the Tools menu, click
  2. Click the Security tab.
  3. Under Macro Security, click Macro Security.
  4. Click the Security Level tab, and then select the security level that you want to use.


For additional information about how to obtain and use digital signatures, click the following article numbers to view the articles in the Microsoft Knowledge Base:
217221 OFF2000: Using SelfCert to Create a Digital Certificate for VBA Projects
206637 OFF2000: Overview of Digital Certificates

Artikel-id: 813968 – senaste granskning 20 juni 2014 – revision: 1