I use an Excel 2007 macro laid out as
...
Windows("Filename.xlsx").Activate
...
ActiveWorkbook.Save
ActiveWindow.Close
...
It works fine but I have to edit filename to open up the next workbook and there are 400+ workbooks in the directory.
Is there a way the workbook names can be put into an array and then loop through the macro doing all the workbooks in one run? Or an alternative approach to sequentially activating workbooks?
Any suggestions appreciated.
...
Windows("Filename.xlsx").Activate
...
ActiveWorkbook.Save
ActiveWindow.Close
...
It works fine but I have to edit filename to open up the next workbook and there are 400+ workbooks in the directory.
Is there a way the workbook names can be put into an array and then loop through the macro doing all the workbooks in one run? Or an alternative approach to sequentially activating workbooks?
Any suggestions appreciated.