protecting Multiple Sheets

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I entered the following code

Sub ProtectAll()

Dim wSheet As Worksheet
Dim Pwd As String

Pwd = InputBox("Enter your password to protect all worksheets",
"Password Input")
For Each wSheet In Worksheets
wSheet.Protect Password:=Pwd
Next wSheet

End Sub




But when i run the code i get an error and all it says is "400", can someone
hep me, i am trying to protect 52 sheets at one time

Thanks
 
This forum is for questions about MS Access, not MS Excel. Your question
might get answered more quickly if you post it in a forum devoted to Excel
questions.

George
 
Sorry, this newsgroup is for questions about Access, the database product
that's part of Office Professional.

I'd recommending reposting your question to a newsgroup related to Excel.
 
Back
Top