Compile error in hidden module: <module name>

A protected module contains a compilation error. Because the error is in a protected module it cannot be displayed.

This error commonly occurs when code is incompatible with the version or architecture of this application (for example, code in a document targets 32-bit Microsoft Office applications but it is attempting to run on 64-bit Office).

This error has the following cause and solution:

Cause of the error:

  • The error is raised when a compilation error exists in the VBA code inside a protected (hidden) module. The specific compilation error is not exposed because the module is protected.

Possible solutions:

  • If you have access to the VBA code in the document or project, unprotect the module, and then run the code again to view the specific error.

  • If you don't have access to the VBA code in the document, then contact the document author to have the code in the hidden module updated.

Note

Interested in developing solutions that extend the Office experience across multiple platforms? Check out the new Office Add-ins model. Office Add-ins have a small footprint compared to VSTO Add-ins and solutions, and you can build them by using almost any web programming technology, such as HTML5, JavaScript, CSS3, and XML.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.