Rather than putting in the waitTime code, use DoEvents to ensure that
the last workbook has closed. Also put a Resume Next in the error trap.
It seemed to work ok for me but then again, I do not have as many
workbooks as you have.
Try this and let me know if it helps...
Private CurrentFile As String
SearchDir = InputBox("Input name of directory to start in")
FileExt = ".xls"
SearchSubs = MsgBox(prompt:="Do you want to include files in
.LookIn = SearchDir
If SearchSubs = vbYes Then
.SearchSubFolders = True
.SearchSubFolders = False
.Filename = FileExt
.MatchTextExactly = True
If .Execute > 0 Then
counter = 0
For i = 1 To .FoundFiles.Count
counter = counter + 1
CurrentFile = .FoundFiles(i)
Application.Caption = CurrentFile
MsgBox prompt:=counter & " files were tested"
ElseIf .Execute = 0 Then
MsgBox "No files were found, no files were converted"
Private Sub ProcessOpenFile()
On Error GoTo Errorhandler
ActiveCell.Value = CurrentFile
ActiveCell.Value = "ERROR OPENING " & CurrentFile
Saddleback College, California