View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Protecting worksheets

This should do it.

Sub protectall()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Select
ActiveSheet.Protect Password:="yourpassword"
Next ws
End Sub

Mike

"Bryan Potter" wrote:

I have a workbook containing some 250 worksheets.

Is there some way to protect all worksheets in a workbook instead of having
to protect each one individually?

Thanks,

Bryan