我在 Excel 中有 VBA 代码,它调用指定本地文件夹中的 Word 文件。
对于某些用户,它会导致以下错误:
The macros in this project are disabled. Please refer to the online help or documentation of the host application to determine how to enable macros
出现错误是因为代码应该从 Excel 移动到 Word 文件。
到目前为止我已经尝试过:
Excel信任中心:
我无法更改它,因为它是灰色的。但是,此设置对所有用户都是相同的。
文字信任中心
最佳答案
故意将其变灰的正常方法(也许您的用户的 IT 通过 gpo 设置它?)是一个注册表项,其中 16.0 是您安装的版本
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Excel\Security]
"VBAWarnings"=dword:00000001
其他一些需要解决的问题:
还有this specific GPO仅阻止来自松散定义的“Internet”的宏
关于excel - 从 Excel : The macros in this project are disabled 调用 Word 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60997134/