vba - Open Excel file from batch script and return message to batch script after closing it again -
i open excel file command line, using statement in batch file:
start /wait excel "myworkbook.xlsb" /e/parameters
inside workbook, there auto-open macro something. in case of errors want close excel , send error message batch file. how achieve that? possible quit application error code or this?
i don't think can return actual errorcode vba batch file.
as mentioned @fabrizio can add error handling code vba. if want batch file check if excel successful or not, have vba error handler create text file details of error , have batch file check existence of file. if file exists, batch file can rename it. way have record of error was.
Comments
Post a Comment