Please make absolutely clear which line is throwing the error.

The "Object Required" error tells you, that an object variable which should hold the reference to an object, has the value of "Nothing", meaning that the creation of an object has failed. To find out which object that would be, you look at the line which object var produced the error, then look back to find the line where the object is created.
Once we found out which object has not been created properly we might make some guesses why this is the case.