您如何使用密码保护从工作表进入 vba 代码编辑器?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6787544/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-11 13:41:30  来源:igfitidea点击:

How do you password protect entering the vba code editor from a sheet?

securityexcelvbapasswords

提问by michelle

I want a method that will password protect my vba code, so that users in the sheet won't be able to go into the code editor without entering it.

我想要一种方法来密码保护我的 vba 代码,这样工作表中的用户将无法在不输入代码的情况下进入代码编辑器。

回答by JMax

You can protect your vba code by a password as described here: http://www.ozgrid.com/VBA/protect-vba-code.htm

您可以按照此处所述通过密码保护您的 vba 代码:http: //www.ozgrid.com/VBA/protect-vba-code.htm

But this is not the most secure way to protect your code, see this thread for more information: Lock down Microsoft Excel macro

但这不是保护代码的最安全方法,请参阅此线程以获取更多信息:锁定 Microsoft Excel 宏