ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   why can i no longer protect multiple worksheets in Excel (https://www.excelbanter.com/excel-worksheet-functions/39608-why-can-i-no-longer-protect-multiple-worksheets-excel.html)

jjinlotusland

why can i no longer protect multiple worksheets in Excel
 
In previous versions of Excel, you could select a series of worksheets and
unprotect or protect them. Apparently this is no longer possible. When i
select more that 1 sheet "protect sheet" function becomes grayed out.

Michael

Hi
Jason Morin submitted this macro back in December to do what you require.

Try a simple macro like this:


Sub ProtectAll()
Dim ws As Object
For Each ws In ThisWorkbook.Sheets
ws.Protect Password:="1234"
Next
End Sub


Right-click on a tab, select View Code, and then double
click on ThisWorkbook to your left in insert the above
macro. Also,change the password from 1234 to whatever you prefer.

HTH
Michael Mitchelson


"jjinlotusland" wrote:

In previous versions of Excel, you could select a series of worksheets and
unprotect or protect them. Apparently this is no longer possible. When i
select more that 1 sheet "protect sheet" function becomes grayed out.



All times are GMT +1. The time now is 05:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com