Option Explicit
Sub AmendFiles()
Dim Wkb As Workbook
Dim WS As Worksheet
Dim counter As Long
Dim filenames As Variant
Application.ScreenUpdating = False
' set the array to a variable and the True is for multi-select
filenames = Application.GetOpenFilename(, , , , True)
counter = 1
' ubound determines how many items in the array
While counter <= UBound(filenames)
'Opens the selected files
Workbooks.Open filenames(counter)
Set Wkb = ActiveWorkbook
For Each WS In Wkb.Worksheets
WS.Unprotect Password:="password"
Next WS
'
' UNSHADE Macro
'
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets(Array("TS1", "TS2", "TS3", "TS4", "TS5", "TS6", "TS7", "TS8", "TS9", "TS10", _
"TS11", "TS12", "TS13", "TS14", "TS15", "TS16", "TS17", "TS18", "TS19", "TS20", "TS21", _
"TS22", "TS23", "TS24", "TS52")).Select
Sheets("TS52").Activate
Sheets(Array("TS25", "TS26", "TS27", "TS28", "TS29", "TS30", "TS31", "TS32", "TS33", _
"TS34", "TS35", "TS36", "TS37", "TS38", "TS39", "TS40", "TS41", "TS42", "TS43", "TS44", _
"TS45", "TS46", "TS47", "TS48", "TS49")).Select Replace:=False
Sheets(Array("TS50", "TS51")).Select Replace:=False
Columns("K:S").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("D6").Select
Sheets(Array("TS1", "TS2", "TS3", "TS4", "TS5", "TS6", "TS7", "TS8", "TS9", "TS10", _
"TS11", "TS12", "TS13", "TS14", "TS15", "TS16", "TS17", "TS18", "TS19", "TS20", "TS21", _
"TS22", "TS23", "TS24", "TS25")).Select
Sheets("TS1").Activate
Sheets(Array("TS26", "TS27", "TS28", "TS29", "TS30", "TS31", "TS32", "TS33", "TS34", _
"TS35", "TS36", "TS37", "TS38", "TS39", "TS40", "TS41", "TS42", "TS43", "TS44", "TS45", _
"TS46", "TS47", "TS48", "TS49", "TS50")).Select Replace:=False
Sheets(Array("TS51", "TS52")).Select Replace:=False
Sheets("TS1").Select
Set Wkb = ActiveWorkbook
For Each WS In Wkb.Worksheets
WS.Protect Password:="password"
Next WS
Wkb.Close True
counter = counter + 1
Wend
Application.ScreenUpdating = True
MsgBox "Operation Complete"
End Sub