EXCEL VBA UserInterfaceOnly:= True 不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14162483/
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
EXCEL VBA UserInterfaceOnly:= True not working
提问by 4 Leave Cover
When I use (some code here).copy destination:=(some code there)
. It will still prompt for protection issues on cells
. Basically it just won't let my code runs.
当我使用(some code here).copy destination:=(some code there)
. 它仍然会提示输入protection issues on cells
. 基本上它不会让我的代码运行。
回答by Peter Albert
The status UserInterfaceOnly:=TRUE
is unfortunately not stored in the file - therefore, if you reopen the file, it will be fully protected. Either use the Workbook_Open
event to reapply this protection status - or unprotect and then reprotect the worksheet in your VBA code directly.
UserInterfaceOnly:=TRUE
遗憾的是,状态未存储在文件中 - 因此,如果您重新打开文件,它将受到完全保护。使用该Workbook_Open
事件重新应用此保护状态 - 或取消保护,然后直接在 VBA 代码中重新保护工作表。
See Ozgridfor further details!
有关更多详细信息,请参阅Ozgrid!