Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Is there a way to protect all the sheets in a workbook in one go? I've got 17-19 sheets (it varies). I could create a macro, but how to handle the different number of sheets? Cheers, Harold |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
something like
for each ws in worksheets if ws.name<"notthisone" _ and ws.name <"notthisoneeither" then end if ws.protect next ws -- Don Guillett Microsoft MVP Excel SalesAid Software "mohavv" wrote in message ... Hi, Is there a way to protect all the sheets in a workbook in one go? I've got 17-19 sheets (it varies). I could create a macro, but how to handle the different number of sheets? Cheers, Harold |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This will do them all...
Sub ProtectAll() dim wks as worksheet for each wks in worksheets wks.protect Password:="Tada" next wks end sub -- HTH... Jim Thomlinson "mohavv" wrote: Hi, Is there a way to protect all the sheets in a workbook in one go? I've got 17-19 sheets (it varies). I could create a macro, but how to handle the different number of sheets? Cheers, Harold |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
or perhaps...
for each ws in worksheets if ws.name<"notthisone" _ and ws.name <"notthisoneeither" then ws.protect end if next ws -- HTH... Jim Thomlinson "Don Guillett" wrote: something like for each ws in worksheets if ws.name<"notthisone" _ and ws.name <"notthisoneeither" then end if ws.protect next ws -- Don Guillett Microsoft MVP Excel SalesAid Software "mohavv" wrote in message ... Hi, Is there a way to protect all the sheets in a workbook in one go? I've got 17-19 sheets (it varies). I could create a macro, but how to handle the different number of sheets? Cheers, Harold |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Mar 12, 10:54*am, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com wrote: This will do them all... Sub ProtectAll() dim wks as worksheet for each wks in worksheets *wks.protect Password:="Tada" next wks end sub -- HTH... Jim Thomlinson "mohavv" wrote: Hi, Is there a way to protect all the sheets in a workbook in one go? I've got 17-19 sheets (it varies). I could create a macro, but how to handle the different number of sheets? Cheers, Harold- Hide quoted text - - Show quoted text - Tx! works fine! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protect some sheets in an xls but not all. | Excel Worksheet Functions | |||
Protect-Unprotect all the sheets | Excel Worksheet Functions | |||
password protect sheets | Excel Worksheet Functions | |||
Protect all Sheets | Excel Discussion (Misc queries) | |||
Protect Sheet > All sheets | Excel Discussion (Misc queries) |