The .Protect in the original code is against the workbook, not the sheet. In the updated code, you don't have .Protect at all.
Untested, but try:
'Option Explicit
Sub Test()
Const csPassword As String = "password"
'define variables for compilation
'Dim MyNum
'Dim MyWb
'Dim wbOPEN As Workbook
'Dim wasOpen As Boolean
MyNum = ThisWorkbook.Sheets("Measurements").Range("H13").Value
On Error Resume Next
Application.ScreenUpdating = False
For Each MyWb In Array("eqdcs 1.xlsm", "eqdcs 2.xlsm", "eqdcs 3.xlsm", "eqdcs 4.xlsm", "eqdcs 5.xlsm", "eqdcs 6.xlsm")
Set wbOPEN = Workbooks(MyWb)
If Not wbOPEN Is Nothing Then
wasOpen = True
Else
Set wbOPEN = Workbooks.Open(ThisWorkbook.Path & Application.PathSeparator & MyWb)
End If
With wbOPEN
With .Sheets("Measurements")
.Unprotect Password:=csPassword
.Range("H13").Value = MyNum
.Protect Password:=csPassword
End With
.Save
' if it wasn't open originally, close it
If Not wasOpen Then
.Close True
End If
End With
Set wbOPEN = Nothing
wasOpen = False
Next MyWb
' done
ThisWorkbook.Save
End Sub
Regards, TMS
Bookmarks