We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 418c681 + 9c8c015 commit fcca7efCopy full SHA for fcca7ef
api/Excel.AllowEditRanges.Add.md
@@ -47,16 +47,16 @@ Sub UseChangePassword()
47
Dim wksOne As Worksheet
48
49
Set wksOne = Application.ActiveSheet
50
-
51
- ' Protect the worksheet.
52
- wksOne.Protect
53
+
54
' Establish a range that can allow edits
55
' on the protected worksheet.
56
wksOne.Protection.AllowEditRanges.Add _
57
Title:="Classified", _
58
Range:=Range("A1:A4"), _
59
Password:="secret"
+ ' Protect the worksheet.
+ wksOne.Protect
60
61
MsgBox "Cells A1 to A4 can be edited on the protected worksheet."
62
@@ -72,4 +72,4 @@ End Sub
72
73
74
75
-[!include[Support and feedback](~/includes/feedback-boilerplate.md)]
+[!include[Support and feedback](~/includes/feedback-boilerplate.md)]
0 commit comments