Thread: Macro
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Macro

One way:

Public Sub ProtectAll()
Const PWORD As String = "drowssap"
Dim wsSheet As Worksheet
For Each wsSheet In Worksheets
wsSheet.Protect PWORD
Next wsSheet
End Sub

In article ,
Deepwater wrote:

I would like to create a Macro to open worksheets( 30 or 31 sheets in one
work book) and protect with password.