hi.
When you get an error message it is most helpful to state which line the error occurs on (it will be highlighted in yellow).

The next thing to do is to follow the code through and see if it is doing what you expect. To do this:
1. click on the first line of the sub and press F8 then carry on pressing F8 and you will see which line is being executed.

My Guess is that find it goes wrong on the workbooks open line. So the question then will be : what value is in myfile. so insert this in the line before: debug.print now, myfile this will display the changing value of myfile in the VBA immediate window.