ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Is it possible to protect multiple worksheets at the same time (https://www.excelbanter.com/excel-worksheet-functions/115052-possible-protect-multiple-worksheets-same-time.html)

Terrie

Is it possible to protect multiple worksheets at the same time
 


Paul B

Is it possible to protect multiple worksheets at the same time
 
Sub Protect_All_Sheets()

Dim ws As Worksheet

For Each ws In ThisWorkbook.Worksheets

ws.Protect password:="123"

Next ws

End Sub
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"Terrie" wrote in message
...





All times are GMT +1. The time now is 11:49 PM.

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