I have a large number of Excel files that I need to open, wait for their opening sub to run, and then close.
Then on to the next one in the list.
etc.
Currently, I'm doing this with a .bat file that simply lists the file names.
It's pretty easy to manage.
But, the disadvantage is that I have to close Excel after each one runs.
(It's not possible to allow all the files to remain open - that will cause the system to hang).
This means that Excel has to open again to run the next.
This is time consuming and the process takes much longer than I'd like.
What I'm thinking is to put the list of filenames into a vba module or into a column of names in a worksheet.
Then sequentially open the file, let the sub run, close the file *while leaving Excel open*.
Also, I'd like the opened files to *not* open a window while running in this mode. I figure this will also save time.
A nudge in the right direction would be very helpful.
Thanks!
Then on to the next one in the list.
etc.
Currently, I'm doing this with a .bat file that simply lists the file names.
It's pretty easy to manage.
But, the disadvantage is that I have to close Excel after each one runs.
(It's not possible to allow all the files to remain open - that will cause the system to hang).
This means that Excel has to open again to run the next.
This is time consuming and the process takes much longer than I'd like.
What I'm thinking is to put the list of filenames into a vba module or into a column of names in a worksheet.
Then sequentially open the file, let the sub run, close the file *while leaving Excel open*.
Also, I'd like the opened files to *not* open a window while running in this mode. I figure this will also save time.
A nudge in the right direction would be very helpful.
Thanks!
Last edited: