I have this code that detects when the Excel.exe task is terminated:
:Excel
tasklist /nh /fi "imagename eq Excel.exe" | find /i "Excel.exe" >nul && (
goto Excel
) || (
goto Continue
)
:Continue
I want to modify this code to make it detect when I close an Excel workbook called
Database.xlsm
This is beacause I need to close ALL the Excel workbooks that I have open in the moment I execute the batch to make it go to
:Continue
I want it go to :Continue only when the Database.xlsm document is closed.
I hope you can help me. Thank you!