View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Paul B[_6_] Paul B[_6_] is offline
external usenet poster
 
Posts: 135
Default Sheets Protection for group!!!!?

Simon, here is a way to do all the sheets at once

Sub protect_sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect
Next ws
End Sub

you may also want to look here for a workaround for grouped sheets
http://www.mcgimpsey.com/excel/prote...ed_sheets.html

--
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 2000 & 97
** remove news from my email address to reply by email **
"Simon Lloyd " wrote in message
...
Does anyone know if there is a way of protecting/unprotecting a group of
sheets in VBA? my current code selects all sheets when a cell is
selected in a certain range, in XL XP the protect unprotect features
work fine, but i'm trying to use the workbook on a machine that has XL
97 and this is where it falls down as it wont use the unprotect
features of XP.

Any ideas????

Simon


---
Message posted from http://www.ExcelForum.com/