Skip to content

Commit fcca7ef

Browse files
authored
Merge pull request #1864 from JohnRowlandACA/patch-1
Update Excel.AllowEditRanges.Add.md
2 parents 418c681 + 9c8c015 commit fcca7ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

api/Excel.AllowEditRanges.Add.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ Sub UseChangePassword()
4747
Dim wksOne As Worksheet
4848

4949
Set wksOne = Application.ActiveSheet
50-
51-
' Protect the worksheet.
52-
wksOne.Protect
53-
50+
5451
' Establish a range that can allow edits
5552
' on the protected worksheet.
5653
wksOne.Protection.AllowEditRanges.Add _
5754
Title:="Classified", _
5855
Range:=Range("A1:A4"), _
5956
Password:="secret"
57+
58+
' Protect the worksheet.
59+
wksOne.Protect
6060

6161
MsgBox "Cells A1 to A4 can be edited on the protected worksheet."
6262

@@ -72,4 +72,4 @@ End Sub
7272

7373

7474

75-
[!include[Support and feedback](~/includes/feedback-boilerplate.md)]
75+
[!include[Support and feedback](~/includes/feedback-boilerplate.md)]

0 commit comments

Comments
 (0)