Excel允许用户编辑范围:如果输入编辑范围的密码,如何更改范围内的锁定单元格以解锁


1

这是关于 允许用户编辑范围 选项。

我已经保护了excel工作表,其中有一些设置的表单区域 allow users to edit range 。现在,是否有可能改变 locked 那个范围内的细胞的性质 unlocked 输入编辑范围的密码后。

Answers:


1

您可以创建一个需要密码才能运行的宏。

然后这个宏可以进入“取消保护”工作表(使用当前工作表密码)并删除工作表的锁定属性。

Sub PasswordProtectedMacro()
    Dim Password As String
        Do Until Password = "edit"
        Password = InputBox("Please enter password below", "Password", "????")
        If Password = "" Then
            Exit Sub
        End If
    Loop


    ActiveSheet.UnProtect Password:="YourPassword", DrawingObjects:=True, Contents:=True, Scenarios:=True _
    , AllowSorting:=True, AllowFiltering:=True, AllowUsingPivotTables:=True
    Cells.Select
    Selection.Locked = False
    Selection.FormulaHidden = False
    Range("A1").Select


End Sub

“YourPassword”=原始表单保护密码

“编辑”=允许宏按所述方式工作所需的密码

这些可以是相同的。只需编辑以满足您的需求等

你的问题的答案是否,这只是一个解决方案,希望它有所帮助。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.