I open an Excel file from the command line, using statement like this in batch file:
start /wait excel "myWorkbook.xlsb" /e/parameters
Inside the workbook, there is an auto-open macro which does something. In case of any errors I want to close Excel and send an error message back to the batch file. How to achieve that? Is it possible to quit the application with an error code or something like this?