Hello all,
I am in the process of working on a macro that goes beyond the scope of recording a macro, it was hoping to get the assistance from the experts.
I want to go into directory and for each of the files in the directory open the file have the macor run the appropriate procedures for the file that was opened and when those set of procedures are done, I would like the macro to move onto the next file and have it process. If there is an error with one of the files I want to have a procedure that writes out which file had an error and why, however, I do not want to have the program stop at that error, but rather, continue for each file in the folder doing the same as above but stopping once the last file in the folder was processed. What is the best way to do that. Currenlty, I have code that I found on this site that allows me to open one file at a time. Also, for each file that was processed cut it and paste it into a new directory (that would be the last procedure for the open file).
Thanks
I am in the process of working on a macro that goes beyond the scope of recording a macro, it was hoping to get the assistance from the experts.
I want to go into directory and for each of the files in the directory open the file have the macor run the appropriate procedures for the file that was opened and when those set of procedures are done, I would like the macro to move onto the next file and have it process. If there is an error with one of the files I want to have a procedure that writes out which file had an error and why, however, I do not want to have the program stop at that error, but rather, continue for each file in the folder doing the same as above but stopping once the last file in the folder was processed. What is the best way to do that. Currenlty, I have code that I found on this site that allows me to open one file at a time. Also, for each file that was processed cut it and paste it into a new directory (that would be the last procedure for the open file).
Thanks