Locked File

Feb 21

This function from the MS site was useful to ensure the file was available before been processed

Function FileLocked(strFileName As String) As Boolean
   On Error Resume Next
   ' If the file is already opened by another process,
   ' and the specified type of access is not allowed,
   ' the Open operation fails and an error occurs.
   Open strFileName For Binary Access Read Write Lock Read Write As #1
   Close #1
   ' If an error occurs, the document is currently open.
   If Err.Number <> 0 Then
      ' Display the error number and description.
      Application.Echo True, "Error #" & str(Err.Number) & " - " & Err.Description
      FileLocked = True
   End If
End Function

If you need some help on a project drop leave a comment on the post and I will reply.