Hi there,
It's not really possible for me to test this properly without access to your lists of files etc., but see if the following knee-jerk additions to your code get you moving in the right direction:
You should note that it can be extremely dangerous to insert an "open-ended" On Error Resume Next statement in a routine. As an example of what can go wrong, if under normal circumstances you try to select a worksheet which doesn't exist and then delete all of its contents, an error message will be generated - if you begin the routine with an On Error Resume Next statement, no error message will be generated and the contents of whichever worksheet happens to be active will be deleted instead!
Whenever you disable Excel's own error handling, you should re-enable it (On Error GoTo 0) as soon as possible afterwards.
Hope this helps.
Regards,
Greg M
Bookmarks