Protect a single sheet

How to protect a single sheet in a workbook using Excel or VBA

METHOD 1. Protect a single sheet

EXCEL

Select sheet > Review tab > Protect Sheet > Enter password > Check Protect worksheet and contents of locked cells > Select components that users can access > Click OK > Reenter password > Click OK

1. Select the worksheet that you want to protect.
Note: in this example we are protecting Sheet2.
Select the worksheet that you want to protect

2. Select the Review tab. Select the Review tab

3. Click on Protect Sheet in the Protect group. Click Protect Sheet

4. In the Protect Sheet dialog box enter a password in the Password to unprotect sheet input box.
5. Check Protect worksheet and contents of locked cells.
6. Select the components of worksheet that you want to allow users access.
7. Click OK.
Check Protect worksheet and contents of locked cells, Enter Password and click OK

8. Reenter the password in the Confirm Password dialog box.
9. Click OK.
Reenter password and click OK

METHOD 1. Protect a sheet using VBA

VBA

Sub Protect_Sheet()
'Protect a sheet, using a password
Sheets("Sheet2").Protect Password:="Pword"

End Sub

ADJUSTABLE PARAMETERS
Sheet to Protect: Select the sheet which you want to protect by changing the Sheet2 sheet name in the VBA code.

Explanation about how to protect a single sheet

EXPLANATION

EXPLANATION

This tutorial shows how to protect a single sheet in a workbook by using Excel and VBA methods.
This tutorial provides one Excel method that can be applied to protect a single sheet. This is achieved in nine steps.
Using VBA you can protect a specific sheet by defining the sheet and using the Protect and Password functions.

RELATED TOPICS

Related Topic Description Related Topic and Description
How to unprotect a single sheet in a workbook using Excel or VBA
How to protect all sheets in a single workbook at once through the use of VBA
How to unprotect all protected sheets in a single workbook at once through the use of VBA