Hi All,
I have 8 individual xlsm files. When run separately each one imports a csv file, formats it, then exports 2 csv files, each with their own variations. I'm thinking instead of opening each file, running a macro in that file, closing it without saving then moving on to the next. It would be quicker to create one main workbook that has a macro to cycle through each of the 8 files. I tried using this code:
and just changing the file name and macro name for each file and repeating the code but the macro closes itself after the first two lines of code (shown above).
I read through this forum often so thought I'd join and post to get your thoughts. I figured there has to be an easier, simpler way of accomplishing this. Thank you.
I have 8 individual xlsm files. When run separately each one imports a csv file, formats it, then exports 2 csv files, each with their own variations. I'm thinking instead of opening each file, running a macro in that file, closing it without saving then moving on to the next. It would be quicker to create one main workbook that has a macro to cycle through each of the 8 files. I tried using this code:
VBA Code:
Workbooks.Open Filename:=ThisWorkbook.Path & "\BOOK123 USE THIS ONE 2099.xlsm"
Application.Run ("'BOOK123 USE THIS ONE 2099.xlsm'!CopyPasteSave2099")
and just changing the file name and macro name for each file and repeating the code but the macro closes itself after the first two lines of code (shown above).
I read through this forum often so thought I'd join and post to get your thoughts. I figured there has to be an easier, simpler way of accomplishing this. Thank you.