//批量加密表格
Sub 加密()
Dim i, n
n = Worksheets.Count
For i = 1 To n
Worksheets(i).Protect Password:="meu123" /*这里可设置密码*/
Next
End Sub
//批量解密表格
Sub 解密()
x = InputBox("请输入登录的密码", "操作提示")
If x = "meu123" Then
For x = 1 To Sheets.Count
Sheets(x).Unprotect ("meu123")/*循环解密*/
Next
End If
End Sub