Dim counter As Integer Dim filename As String Dim problemfile() As String Dim errorcounter As Integer Dim i As Integer 'common counter Sub main() '--> Here: Define vault "myvault" etc. ActiveSheet.Cells(1, 1).Select While ActiveCell.Value <> "" 'Repeat until empty cell is found filename = ActiveCell.Value On Error GoTo Error '--> Check out file (Lockfile...) On Error GoTo 0 ActiveCell.Offset(1, 0).Select counter = counter + 1 Wend MsgBox ("Processed " & counter & "files" & vbCrLf & errorcunter & " errors occured") ' Here I will do something with the list of problematic files Exit Sub Error: errorcounter = errorcounter + 1 problemfile(errorcounter) = filename Resume Next End Sub