Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Macro High Security Warning for User Defined-Functions Appears


View products that this article applies to.

Symptoms

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.

↑ Back to the top


Cause

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.

↑ Back to the top


Workaround

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 Options.
  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.

↑ Back to the top


References

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

↑ Back to the top


Keywords: KB813968, kbprb

↑ Back to the top

Article Info
Article ID : 813968
Revision : 6
Created on : 9/18/2011
Published on : 9/18/2011
Exists online : False
Views : 354