Sub CopyRanges()
Dim wkbSource As Workbook
Dim MyPath As String
Dim MyFile As String
Dim ws As Worksheet
Application.ScreenUpdating = False
MyPath = "C:\Test" 'modify to match the path to your folder
If Right(MyPath, 1) <> "\" Then MyPath = MyPath & "\"
MyFile = Dir(MyPath & "*.xls*")
Do While Len(MyFile) > 0
Set wkbSource = Workbooks.Open(MyPath & MyFile)
With wkbSource
For Each ws In Sheets
ws.Protect Password:="mypassword"
Next ws
.Close savechanges:=True
End With
MyFile = Dir
Loop
Application.ScreenUpdating = True
End Sub