Hello MrExcel-Forum,
there once was a computer,
who at certain times, ran a batch-file via the task-scheduler,
the batch-file starts an xlsm-file,
and the xlsm-file used "thisWorkbook.close false" at the end of their vba (in workbook.open. the "false" means that changes are not saved).
there was only one instance of Excel running at all times in which the xlsm-files run themselves in when triggered.
and everyone lived happily ever after...
until at some point an xlsm-file got triggered while another is still calculating.
then this happened: the new xlsm-file starts ANOTHER instance of Excel.
so i come home to this:
whenever this happens, there starts another instance of excel.
so after a week, there is like 20 of them. This was my problem.
There are multiple solutions that i could imagine:
Ideal would be that the xlsm-file closes its instance of Excel if there is another running.
Eventually using thisApplication.Quit once every hour could work, but it could collide with an xlsm-file.
Or to somehow queue the workbooks? Maybe run multiple Workbooks in one instance?
Thank you very much in advance
skper
there once was a computer,
who at certain times, ran a batch-file via the task-scheduler,
the batch-file starts an xlsm-file,
and the xlsm-file used "thisWorkbook.close false" at the end of their vba (in workbook.open. the "false" means that changes are not saved).
there was only one instance of Excel running at all times in which the xlsm-files run themselves in when triggered.
and everyone lived happily ever after...
until at some point an xlsm-file got triggered while another is still calculating.
then this happened: the new xlsm-file starts ANOTHER instance of Excel.
so i come home to this:
whenever this happens, there starts another instance of excel.
so after a week, there is like 20 of them. This was my problem.
There are multiple solutions that i could imagine:
Ideal would be that the xlsm-file closes its instance of Excel if there is another running.
Eventually using thisApplication.Quit once every hour could work, but it could collide with an xlsm-file.
Or to somehow queue the workbooks? Maybe run multiple Workbooks in one instance?
Thank you very much in advance
skper