Hello. My name is***** can help you with your question.
The first thing I would do on the one that appears to be working is to take out the on error resume next. The reason is that this will cause the script just to skip any errors and continue without tell you where the errors are. So will make it appear that there is no error but it doesn't actually do anything to fix the error.