简体   繁体   English

如何使用VBA在Excel中将无密码的单元格设置为只读?

[英]How to make a Cell Read Only in Excel without Password using VBA?

I'm trying to set a few specific cells read-only. 我正在尝试将一些特定的单元格设置为只读。

How do I lock a specific "selection" (say cell) in Excel? 如何在Excel中锁定特定的“选择”(例如单元格)? I don't want to use password. 我不想使用密码。 I want to make them Read Only. 我想将它们设置为只读。

Another way you can do this is through Data Validation. 您可以执行此操作的另一种方法是通过数据验证。 After you have a cell populated with the desired contents, Choose Data Validation and use the Custom option. 在具有所需内容的单元格填充后,选择“数据验证”并使用“自定义”选项。 For the formula enter ="" 对于公式,输入=“ =”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM