Hi All,
I have a VBA code i am using to password protect a document with multiple (50+) input worksheets and sensitive formulas
The code i have (found online) input as a module is as below however i also need the users to be able to use autofilter where i have a filter bar included and possibly be able to edit the cell width height coum etc. Obviosuly i can do this using the worksheet password protect and choosing the options in the check boxes but this takes an awfully long time and RSI with so manys sheet. Any assistance willfully accepted. Thanks. Edd
Sub protect_all_sheets()
top:
pass = InputBox("password?")
repass = InputBox("Verify Password")
If Not (pass = repass) Then
MsgBox "you made a boo boo"
GoTo top
End If
For i = 1 To Worksheets.Count
If Worksheets(i).ProtectContents = True Then GoTo oops
Next
For Each s In ActiveWorkbook.Worksheets
s.Protect Password:=pass
Next
Exit Sub
oops: MsgBox "I think you have some sheets that arealready protected. Please unprotect all sheets then running this Macro."
End Sub
I have a VBA code i am using to password protect a document with multiple (50+) input worksheets and sensitive formulas
The code i have (found online) input as a module is as below however i also need the users to be able to use autofilter where i have a filter bar included and possibly be able to edit the cell width height coum etc. Obviosuly i can do this using the worksheet password protect and choosing the options in the check boxes but this takes an awfully long time and RSI with so manys sheet. Any assistance willfully accepted. Thanks. Edd
Sub protect_all_sheets()
top:
pass = InputBox("password?")
repass = InputBox("Verify Password")
If Not (pass = repass) Then
MsgBox "you made a boo boo"
GoTo top
End If
For i = 1 To Worksheets.Count
If Worksheets(i).ProtectContents = True Then GoTo oops
Next
For Each s In ActiveWorkbook.Worksheets
s.Protect Password:=pass
Next
Exit Sub
oops: MsgBox "I think you have some sheets that arealready protected. Please unprotect all sheets then running this Macro."
End Sub