I have a procedure that launches another application and exports a data file in Excel format. The same procedure then attempts to Open the file using the Workbooks.Open method. Before opening the file, I check to make sure it exists using the Dir() function (this helps to ensure that the export action didn't fail). Most of the time this works great, however, occasionally the Open method will fail because the file is inaccessible (i.e. the exporting application has created the file, but not yet completed the export and thus has not released the file). I'd like to find a way to check that the data file not only exists, but is accessible, increasing the odds that my Open method will complete successfully.
Anyone have any ideas?
Anyone have any ideas?