How to Continue on Error, Excel Application error

The File i created is to look for only excel documents containing “Revenue Report” in their name. There is two files in the folder, however, loop looks for a third temporary file I did not create. I used a series of writelines to see the process the app is doing before crash. All i need it to do has been done before the error, thus I would like to continue on error if possible. Please advise on how to tackle this buggy nightmare.




Keep body of the For Each loop inside Try Catch block. So that if one file is failed to open then it will look for next file.

1 Like

Hey @Saad_Sajjad_Khattak ! Temporary files in Windows OS have “~” char.

So add your IF logic like this:

excel_file.Contains("REVENUE REPORT") and (Not excel_file.Contains("~"))

Then add your excel application Scope activity inside your “Then” path

Hope it helps!

1 Like

I don’t know how you know so much, but you have saved me twice now. Thank you so much digital superman hahahah.

1 Like

I tried this before posting on the forum, this did not work for my issue.

Thanks for the attempt tho.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.