Another Protection Q

  • Thread starter Thread starter JudithJubilee
  • Start date Start date
J

JudithJubilee

Hello there,

I also would like to know how to protect multiple sheets
within the same workbook at once. I am using 2000.

Thanks

Judith
 
Judith

VBA code must be used.

Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Protect Password:="justme"
Next n
Application.ScreenUpdating = True
End Sub

Sub UnprotectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Unprotect Password:="justme"
Next n
Application.ScreenUpdating = True
End Sub


Gord Dibben Excel MVP
 
Hi,
You can't. You will have to protect each one individually (I believe).

For X = 1 to 3
Sheets(x).protect
Next


Hth,
O
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top