![]() |
Read-Only
Is there a way to set all worksheets
to read only? Thanks - Kirk |
Read-Only
Sub kirkm()
For Each ws In ActiveWorkbook.Sheets ws.Protect Next 'ws End Sub To unprotect them, change the term "Protect" to "Unprotect". Or you can manually unprotect each sheet using Excel's menu: Tools|Protection|Unprotect Sheet... -- Jay "kirkm" wrote: Is there a way to set all worksheets to read only? Thanks - Kirk |
Read-Only
Follow-up information:
The procedure in my previous post protects all cells that are "Locked". Because the default for all worksheet cells is Locked, the procedure should work fine whenever the Locked property has not been adjusted in any workbook cells. However, if your worksheets include any 'unlocked' cells, those cells will not receive read-only protection. Check or change the Locked property of a cell by: Format|Cells|Protection Tab|Locked checkbox... -- Jay "kirkm" wrote: Is there a way to set all worksheets to read only? Thanks - Kirk |
Read-Only
On Mon, 5 Mar 2007 16:24:18 -0800, Jay
wrote: Sub kirkm() For Each ws In ActiveWorkbook.Sheets ws.Protect Next 'ws End Sub To unprotect them, change the term "Protect" to "Unprotect". Or you can manually unprotect each sheet using Excel's menu: Tools|Protection|Unprotect Sheet... Thanks Jay, that just what I wanted. Haven't got any locked cells so that shouldn't be a factor. Cheers - Kirk. |
All times are GMT +1. The time now is 06:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com