با استفاده از ماکروی زیر میشه تمام شیت ها را همزمان قفل کرد:
Sub Protect_All_Sheets()
    Dim sh As Worksheet
    For Each sh In ActiveWorkbook.Worksheets
        sh.Protect "123"
    Next
End Sub 
و با کد زیر بازگشایی شیت های قفل شده انجام خواهد شد :
Sub sbUnProtectAll()
On Error GoTo ErrorOccured
Dim pwd1 As String
pwd1 = InputBox("Please Enter the password")
If pwd1 = "" Then Exit Sub
For Each ws In Worksheets
ws.Unprotect Password:=pwd1
Next
MsgBox "All sheets UnProtected."
Exit Sub
ErrorOccured:
MsgBox "Sheets could not be UnProtected - Password Incorrect"
Exit Sub
End Sub  

ورود به سایت