excel 如何利用宏给所有的工作表同时加密,同时具有加密区域单元格设置权限

2025-04-09 07:44:29
推荐回答(1个)
回答1:

Sub pst()
Dim st As Worksheet
For Each st In Worksheets
st.Protect "123"
If st.Protection.AllowFormattingCells = False Then
        st.Protect AllowFormattingCells:=True
    End If
Next st
End Sub