Public Function ProtectAllSheets() Dim sheet As Worksheet For Each sheet In ActiveWorkbook.Worksheets sheet.EnableSelection = xlUnlockedCells sheet.Protect Password:="Password", DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowFiltering:=True Next sheet End Function Public Function UnprotectAllSheets() Dim sheet As Worksheet For Each sheet In ActiveWorkbook.Worksheets sheet.Unprotect Password:="Password" Next sheet End Function
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....