I am sorry, that is my fault, I did not explain it clearly enough.
This line
If Err.Number = "Error Number" Then Resume Next
The part that says "Error Number" needs to be replaced with the Numeric Value of the actual error number that you get when the error occurs from the line above.
So you need to remove that line causing the error until you have a number to put in it.