Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
受保护板材-VBA_Vba_Excel - Fatal编程技术网

受保护板材-VBA

受保护板材-VBA,vba,excel,Vba,Excel,我使用了以下功能来保护一张纸 Sub sbProtectSheet() ActiveSheet.Protect "password", True, True End Sub Sub sbUnProtectSheet() ActiveSheet.Unprotect "password" End Sub 此工作表上有一个图表,我想取消保护,而工作表的其余部分则保持保护状态。我似乎只发现你可以解开一个特定的范围,而没有别的 这是我录制的一个宏,只是为了看看如何使图形对象可供选择

我使用了以下功能来保护一张纸

Sub sbProtectSheet()

    ActiveSheet.Protect "password", True, True

End Sub


Sub sbUnProtectSheet()

  ActiveSheet.Unprotect "password"
End Sub

此工作表上有一个图表,我想取消保护,而工作表的其余部分则保持保护状态。我似乎只发现你可以解开一个特定的范围,而没有别的

这是我录制的一个宏,只是为了看看如何使图形对象可供选择:

ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= True
我非常确信,您将能够将其修复到您的代码中