Maybe the copyfile doesn't like the variant variables. Try Dimming them as String.
You use Set when you are dealing with objects. So, when you say:
You are setting the variables to be the range objects.
"Me" in relation to a worksheet would be the workbook.
If you look back at the original code, you were passing copyfile two strings which were fully qualified source and destination locations/filenames. So, you need to pass it two string variables each containing a fully qualified location/filename.
I hope that clarifies and solves the problem.
If not, please post a sample workbook with your code.
Regards, TMS
Bookmarks