Home
Forums
VBA macros
Tutorials
Downloads
Open XL
Jobs
About Us
Protect all WorkSheets in the WorkBook
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
Post a Comment
Newer Post
Older Post
Home
Post a Comment