Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need advice from the experts.

Status
Not open for further replies.

alwayslrN

IS-IT--Management
Jun 20, 2006
159
US
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
 




Hi,

Post what you have so far. You'll get some TIPS, I'm sure.

Skip,

[glasses] [red][/red]
[tongue]
 
OK - I was trying to make sure I did not go off in the wrong direction, but I will give it a try.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top