Error Handling
Im having trouble effectively handling errors during run time. The problem is that the vba error handler will only run once. So if you're trying to trap errors that occur as part of a loop you can call your error sequence once but the second error causes a run time error and fails to continue past the warning message.
The details;
- In my macro Im saving files to particular locations. I wrote an error trap just incase the relivant folder didnt exist or another user was already accessing the file.
- If an error occurs then my macro makes a log of it before clearing the error log and continuing through the loop.
- The macro works great until yo uencounter the error for the second time, where you get a run-time error and it doesnt want to call my error handling routine.
Anybody have any ideas / help please?
Thanks,
Dave.
Danger shines like sunshine in a brave mans eyes!
|