I have a spreadsheet that is updated by over 30 workbooks at the press of a button.
The problem is that if any of those workbooks are open the code crashes.
What I'd like is for a piece of code that will loop through the folder containing the workbooks and display a message if it finds an open file warning staff not to update. I don't necessarily need to know which workbooks are open, I just need to know if any workbook is open.
I can find code to check if a specific file is open, but can find nothing to check for any open file.
Does anyone have any ideas?
The problem is that if any of those workbooks are open the code crashes.
What I'd like is for a piece of code that will loop through the folder containing the workbooks and display a message if it finds an open file warning staff not to update. I don't necessarily need to know which workbooks are open, I just need to know if any workbook is open.
I can find code to check if a specific file is open, but can find nothing to check for any open file.
Does anyone have any ideas?