Hello,
I have a question. I have an excel worksheet that will have a macro that opens up 9 other workbooks in a specified directory. I will also know the names of the 9 workbooks that need to be opened.
In the macro, is it easier to write out the filenames and path to open, or is there a way to open all files in a certain directory (using some kind of for loop)?
I was intially thinking to just write 9 open statements in the code since i know the path and filename. Only problem, that's static and if they ever add another filename in the future, I will have to add it to the code (but they say they won't)
THANKS.
I have a question. I have an excel worksheet that will have a macro that opens up 9 other workbooks in a specified directory. I will also know the names of the 9 workbooks that need to be opened.
In the macro, is it easier to write out the filenames and path to open, or is there a way to open all files in a certain directory (using some kind of for loop)?
I was intially thinking to just write 9 open statements in the code since i know the path and filename. Only problem, that's static and if they ever add another filename in the future, I will have to add it to the code (but they say they won't)
THANKS.