![]() |
simultaneous protection
I have set up a workbook containing 15 sheets. 12 of them are named Jan to
Dec. I KNOW how to protect each one, but is it possible to protect all twelve in one go ? |
simultaneous protection
You can try out the below macro. If you are new to macros..
--Set the Security level to low/medium in (Tools|Macro|Security). --From workbook launch VBE using short-key Alt+F11. --From menu 'Insert' a module and paste the below code. --Get back to Workbook. --Run macro from Tools|Macro|Run <selected macro() Sub ProtectSheets() Dim intCount As Integer For intCount = 1 To 12 Sheets(CStr(MonthName(intCount, True))).Protect Password:="password" Next End Sub Sub UnProtectSheets() Dim intCount As Integer For intCount = 1 To 12 Sheets(CStr(MonthName(intCount, True))).UnProtect Password:="password" Next End Sub -- Jacob "Peese" wrote: I have set up a workbook containing 15 sheets. 12 of them are named Jan to Dec. I KNOW how to protect each one, but is it possible to protect all twelve in one go ? |
All times are GMT +1. The time now is 12:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com