So, I have a pretty large macro that does a number of things. The first is calling .exe files for a particular program to open that is not a Microsoft application. Then once it opens the programs it executes a number of auto scripts written in VB language. 9 out of 10 times it works, but occasional at the start, it will give an OLE error. Seeing as I am unable to fix the error, I need to suppress it and continue. Simply hitting "ok" does not work since I am not always watching it. So, I have some error handling code written to a .bat file that calls the initial process. The macro executes on workbook open and generally does what it needs to do. Is there a VBA "if statement" that can be written to say, If OLE error, application.quit? This will cause the .bat file error handling to kick in and restart the process. I realize this is not the ideal way to handle it, but it is a workaround until the true problem is resolved. With that said, it is my understanding that the OLE error is an actual windows API error rather then Excel.
Thank you for any available help!
Bookmarks