0
0
Excelspreadsheet~10 mins

Sheet protection in Excel - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to protect the active sheet in Excel using VBA.

Excel
ActiveSheet.[1] "mypassword"
Drag options to blanks, or click blank then click option'
AProtect
BUnprotect
CSave
DOpen
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Unprotect' instead of 'Protect'.
Forgetting to add the password.
Using methods unrelated to protection like 'Save'.
2fill in blank
medium

Complete the code to unprotect the active sheet with a password.

Excel
ActiveSheet.[1] "mypassword"
Drag options to blanks, or click blank then click option'
AClose
BProtect
CSave
DUnprotect
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Protect' instead of 'Unprotect'.
Not providing the password.
Using unrelated methods like 'Save'.
3fill in blank
hard

Fix the error in the code to protect the sheet with password '1234'.

Excel
Worksheets("Sheet1").[1] "1234"
Drag options to blanks, or click blank then click option'
ASave
BUnprotect
CProtect
DClose
Attempts:
3 left
💡 Hint
Common Mistakes
Using password without quotes causing syntax error.
Using 'Unprotect' instead of 'Protect'.
4fill in blank
hard

Fill both blanks to protect the sheet and allow users to select locked cells.

Excel
ActiveSheet.[1] Password:="pass", AllowSelectingLockedCells:=[2]
Drag options to blanks, or click blank then click option'
AProtect
BUnprotect
CTrue
DFalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Unprotect' instead of 'Protect'.
Setting AllowSelectingLockedCells to False disables selection.
5fill in blank
hard

Fill all three blanks to unprotect the sheet, clear contents of cell A1, and then protect it again with a password.

Excel
ActiveSheet.[1] Password:="secret"
Range("A1").[2] = ""
ActiveSheet.[3] Password:="secret"
Drag options to blanks, or click blank then click option'
AProtect
BValue
CUnprotect
DClearContents
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Protect' instead of 'Unprotect' first.
Using 'ClearContents' as a method instead of setting Value to empty string.
Forgetting to protect the sheet again.