Sub 保护工作表()
 Dim sht As Worksheet
 Dim mySheet As String
 On Error Resume Next
 Application.ScreenUpdating = False
 For Each sht In Worksheets
 mySheet = sht.Name
 Sheets(mySheet).Protect Password:="1234", DrawingObjects:=True, Contents:=True, Scenarios:=True
 Next sht
 Application.ScreenUpdating = True
 End Sub
Sub 撤销工资表保护()
 Dim sht As Worksheet
 Dim mySheet As String
 On Error Resume Next
 Application.ScreenUpdating = False
 For Each sht In Worksheets
 sht.Unprotect "1234"
 Next sht
 Application.ScreenUpdating = True
 End Sub