Re: Worksheet Protection
- From: "Alan" <alan111@xxxxxxxxxxxx>
- Date: Sat, 6 Jan 2007 01:59:33 -0000
Press Alt and F11 together to open the VB Editor
Click 'Insert' > 'Module'
In the empty window on the right, copy and paste this code,
Sub Protect()
Dim WK As Worksheet
For Each WK In ThisWorkbook.Worksheets
WK.Protect Password:="password"
Next WK
End Sub
Sub Unprotect()
Dim WK As Worksheet
For Each WK In ThisWorkbook.Worksheets
WK.Unprotect Password:="password"
Next WK
End Sub
Hit Alt and F11 to close the VB Editor
Go 'Tools' > 'Macro's
'Protect' will protect all sheets, 'Unprotect' will unprotect all sheets.
Alter the password as required.
You can assign the macro's to buttons via the 'View' > 'Toolbars' > 'Forms'
menu,
Regards,
Alan.
"faeiz2" <faeiz12@xxxxxxxxx> wrote in message
news:1168046689.470828.110360@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Good day to all
I have so many worksheet to protect. How do I protect them all together
with a single operation (no need to go to each worksheet and do the
protection).
Thank You for help
.
- Follow-Ups:
- Re: Worksheet Protection
- From: faeiz2
- Re: Worksheet Protection
- References:
- Worksheet Protection
- From: faeiz2
- Worksheet Protection
- Prev by Date: Re: Worksheet Protection
- Next by Date: Re: Values
- Previous by thread: Re: Worksheet Protection
- Next by thread: Re: Worksheet Protection
- Index(es):
Relevant Pages
|