Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Macro to protect all using same password.
Sub ProtectAllSheets() Application.ScreenUpdating = False Dim n As Single For n = 1 To Sheets.Count Sheets(n).Protect Password:="justme" Next n Application.ScreenUpdating = True End Sub And to unprotect all................................. Sub UnprotectAllSheets() Application.ScreenUpdating = False Dim n As Single For n = 1 To Sheets.Count Sheets(n).Unprotect Password:="justme" Next n Application.ScreenUpdating = True End Sub And to protect just selected sheets.......................... Sub Protect_Selected_Sheets() Set MySheets = ActiveWindow.SelectedSheets For Each ws In MySheets ws.Select ws.Protect Password:="justme" Next ws End Sub Gord Dibben MS Excel MVP On Tue, 1 Jun 2010 15:55:01 -0700, Vimlesh wrote: If we select either few worksheets or all worksheet by holding 'shift' key, can these all worksheet be protected/unprotected simultaneously using either same or different passwords for each sheet. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PROTECT MULTIPLE SHEETS IN EXCEL WORKBOOK SIMULTANEOUSLY? | Excel Discussion (Misc queries) | |||
How do I password protect a single worksheet within a workbook f | Excel Discussion (Misc queries) | |||
Protect Workbook vs Worksheet?? | Excel Worksheet Functions | |||
How can I protect several sheets in a workbook simultaneously? | Excel Discussion (Misc queries) | |||
How do I protect a worksheet from being opened inside a workbook | Excel Discussion (Misc queries) |