What does the checkbox “Trust access to the VBA Project Model” mean? [closed]

安稳与你 提交于 2019-12-25 07:59:10

问题


"Trust access to the VBA project model" is something I instinctively click on right after "Enable all macros", simply because I don't have time to workout whether or not it will break the code I would like to run.

This is naughty - I should know what I'm doing and the implications. Assuming I've enabled all macros already, what extra features/dangers are exposed to me when I open the Pandora's Box of trusting access to the VBA project model?

This line of code runs without trusting access:

VBAProject.Sheet1.Calculate

Please would you post some code that requires trusted access?


回答1:


It allows your code to access the VBA project by doing such things as reading and altering other code or changing the codenames of objects. Basically it controls access to the properties and methods of anything you access via the Workbook.VBProject property.



来源:https://stackoverflow.com/questions/23536930/what-does-the-checkbox-trust-access-to-the-vba-project-model-mean

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!