i did suggest passing the workbook to the sub, but if you do as torc suggests then you need to move the application.enableevents to where the workbook is opened
here is another option
vb Code:
Sub open_workbooks()
Dim cell As Range
For Each cell In Range("A2", Range("A2").End(xlDown))
Application.EnableEvents = False
Set w = Workbooks.Open(cell.Value)
Application.EnableEvents = True
update_Timer w
cell.Interior.Color = 13434828
Next cell
End Sub
Sub update_Timer(w As Workbook)
Dim vc As Object
Dim eend As Long
Dim mystr As String, repstr As String
' If w.VBProject.VBComponents("XTAQ").codemodule.Find("TIMERSEC = 25", 1, 1, eend, 1, False, False, False) Then 'only do anything if that variable and value are found in the module
With w.VBProject.VBComponents("module1").codemodule
eend = .CountOfLines
mystr = .Lines(1, eend)
repstr = Replace(mystr, "mystr = 8", "mystr = 24")
.DeleteLines 1, eend
.InsertLines 1, repstr & vbNewLine & "'test done"
End With
w.Save
' End If
w.Close
End Sub