Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Is there a way to protect and unprotect several worksheets, in the same
workbookat the same time? Or do you have to do each one individually? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Right click on the first sheet tab, View Code, paste the following code
there. Sub Protect_Selected_Sheets() Set MySheets = ActiveWindow.SelectedSheets For Each WS In MySheets WS.Select WS.Protect Password:="password" Next WS End Sub Now Save and close Now Right click on the second sheet tab, View Code, paste the following code there. Sub Protect_Selected_Sheets() Set MySheets = ActiveWindow.SelectedSheets For Each WS In MySheets WS.Select WS.Unprotect Password:="password" Next WS End Sub Save and Close. Now assign shortcut keys to the macros. for example to protect, CTRL+M and to unprotect, CTRL+J. Whenever you want to protect all the sheets, right click on any of the sheet tabs, click on 'Select all sheets' and press CTRL+M. Same is to unprotect just press CTRL+J. "biggrila06" wrote in message ... Is there a way to protect and unprotect several worksheets, in the same workbookat the same time? Or do you have to do each one individually? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protecting Worksheets | Excel Discussion (Misc queries) | |||
Protecting worksheets | Excel Discussion (Misc queries) | |||
Protecting worksheets | Excel Worksheet Functions | |||
Protecting Worksheets | Excel Worksheet Functions | |||
Protecting Worksheets | Excel Discussion (Misc queries) |