4966 leroy LV4
2010-8-26 14:38引用: Sub mima2()
Dim sht As Worksheet, rng As Range
On Error Resume Next
For Each sht In ThisWorkbook.Worksheets
With sht
.Unprotect Password:='aaa123' '撤销工作表保护
.Range('A:IV').Locked = False '取消所有单元格格式》保护 中的锁定选项
With .UsedRange.SpecialCells(xlCellTypeFormulas) '定位所有含有公式的单元格
.Locked = True '选中所有单元格格式》保护 中的锁定选项
.FormulaHidden = True '隐藏公式
End With
.Protect Password:='aaa123' '保护工作表,并将密码设置为aaa123
End With
Next
End Sub
4楼 leroy 楼主
2010-8-26 14:556楼 zjdh LV6
2010-8-26 14:558楼 chenxf1319 LV2
2010-8-26 15:019楼 ArnoldTsay LV2
2011-7-5 05:1810楼 zjdh LV6
2011-7-5 14:50联系客服