![]() |
refresh a folder
My "process" macro cycles through a folder and opens each workbook and does
stuff to it. When it is finished, it closes the workbook and moves it to a "completed" folder. The workbooks are sent to this folder by our cost centers with another macro. During month-end, the volume of worbooks submitted by the cost centers increases significantly. I've noticed the "process" macro only processes workbooks submitted prior to starting this macro. Any workbook submitted by the cost centers after the macro has started (and is running) does not get processed. I have to re-start the "process" macro and cycle through the folder again to get the "new" workbooks processed. Is it possible to programmatically "refresh" the folder each time a workbook is processed so any "new" workbook submitted while the macro is running is processed? Thanks for the help. -- JT |
refresh a folder
Without knowing what you've got set up, you could probably do something like
this Before you start looping through the workbooks Dim WBFound as Boolean Do WBFound = False 'Put all your Workbook Processing here 'When you process a workbook, set WBFound = TRUE Loop while WBFound = TRUE -- HTH, Barb Reinhardt "JT" wrote: My "process" macro cycles through a folder and opens each workbook and does stuff to it. When it is finished, it closes the workbook and moves it to a "completed" folder. The workbooks are sent to this folder by our cost centers with another macro. During month-end, the volume of worbooks submitted by the cost centers increases significantly. I've noticed the "process" macro only processes workbooks submitted prior to starting this macro. Any workbook submitted by the cost centers after the macro has started (and is running) does not get processed. I have to re-start the "process" macro and cycle through the folder again to get the "new" workbooks processed. Is it possible to programmatically "refresh" the folder each time a workbook is processed so any "new" workbook submitted while the macro is running is processed? Thanks for the help. -- JT |
All times are GMT +1. The time now is 07:39 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com