Have a look at the msgbox. It says the code is looking for an invalid path because it includes the C:\Users\YongX twice and it is also looking inside a folder on the desktop which is not what was previously specified.
Have a closer look at the code you are trying to implement and work out where those two parts get added together. We aren't trying to do your work for you - you have to make an effort to understand the code supplied a little bit too.
Step through the code one line at a time by pressing F8. Hover your mouse over the variables as the lines execute and pay attention to the values that those string variables have as the macro progresses. When you notice a problem, stop the code and fix it before trying again.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|