Table of contents
TOC
折叠目录
展开目录

编译错误隐藏模块中:Compile error in hidden module:

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

受保护的模块包含一个编译错误。受保护模块中的错误是因为它不能显示。A protected module contains a compilation error. Because the error is in a protected module it cannot be displayed.

当代码与此应用程序的版本或体系结构不兼容(例如文档中的代码面向 32 位 Microsoft Office 应用程序,但它试图在 64 位 Office 上运行)时,通常会发生此错误。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:

  • 保护 (隐藏) 的模块中的 VBA 代码中存在编译错误时,将引发错误。不公开特定的编译错误,因为受到该模块。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:

  • 如果您具有访问文档或项目中的 VBA 代码的权限,请先取消对该模块的保护,然后再次运行该代码以查看具体的错误。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.

  • 如果您没有访问文档中的 VBA 代码的权限,请与文档作者联系,让作者更新隐藏模块中的代码。If you do not have access to the VBA code in the document, then contact the document author to have the code in the hidden module updated.

© 2018 Microsoft