问题
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.
回答1:
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.
See Ozgrid for further details!
来源:https://stackoverflow.com/questions/14162483/excel-vba-userinterfaceonly-true-not-working