不信任对Visual Basic项目的编程访问 [英] Programmatic Access To Visual Basic Project Is Not Trusted

查看:372
本文介绍了不信任对Visual Basic项目的编程访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的计算机上有两个预定的任务.他们都打开Excel文件并运行宏&他们的工作非常相似.它们都可以在我的计算机上工作.但是,我将排定的任务移到了同事的计算机上.一个工作,另一个没有.

I have two scheduled tasks on my computer. They both open Excel files and run a macro & are pretty similar in what they do. They both work on my computer. However I moved the scheduled tasks onto a colleague's computer. One worked the other didn't.

一个不起作用的人打开了Excel,但出现错误:

The one that didn't work opened Excel but had an error saying:

不信任以编程方式访问Visual Basic项目".

"programmatic access to visual basic project is not trusted".

就像我说的那样,两个Excel文件都非常相似.一个无效的项目确实引用了另外两个项目,另一个无效.他们是

Like I say, both Excel files are very similar. The one that didn't work does reference two additional projects the other one does not. They are,

Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Windows Common Controls-2.6.0 (SP6)

我以前从未遇到过这个错误.

I have never come across this error before.

推荐答案

文件->选项->信任中心->信任中心设置->宏设置->信任对VBA项目对象模型的访问.

File -> Options -> Trust Center -> Trust Center Setttings -> Macro Settings -> Trust Access to the VBA Project object model.

如果您要引用可扩展性库,通常需要这样做.

This is usually needed if you are referencing Extensibility library.

这篇关于不信任对Visual Basic项目的编程访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆