Move multiple files by vba

hdgfss

New Member
my files are located in C:\Users\WolfieeeStyle\Desktop\Files
i have to move 4 to 5 files(it can be more than this) from here C:\Users\WolfieeeStyle\Desktop\Files to C:\Users\WolfieeeStyle\Desktop
condition-check wheather my files are located in C:\Users\WolfieeeStyle\Desktop\Files if yes then move it to C:\Users\WolfieeeStyle\Desktop and if not then do nothing
Important- i will add the file names in the vba code so that if it is there then it will be moved ( i will put 7 or 8 files name in vba code or more)
 

hdgfss

New Member
Sorry Sir I don't know who he is
and that code is for only 1 file
and i am dealing with multiple file sir
Our process is for multiples files Sir
 

Fluff

MrExcel MVP, Moderator
Funny how the question is very very similar, including the file locations to be used.
You said you would hardcode the filenames & that is what the code in the link does. Simply repeat the code for the other filenames.
 

hdgfss

New Member
Sir if i have to move 10 files then i have to make 10 macros sir
it is not a good option and i think it is not recommendable also sir
 

hdgfss

New Member
I don't know sir that's why i am looking for guidance
Plz Guide Sir
 
Last edited:

Joe4

MrExcel MVP, Junior Admin
hdgfss,

What you are going to find is that people here typically do not like to do people's homeowrk/assignments for them (that really isn't ethical).
However, we will be willing to point you in the right direction, give you hints, or critique code that you have come up with. Both Fluff and I have given you tips, but you still not have shown any effort of your own on this question.

So I suggest you look at the links we have provided, and try to see what coe you can come up with. If it doesn't work out quite right, you can post the code you have attempted here, and we can point out where the problem areas are.
 
Last edited:

Some videos you may like

This Week's Hot Topics

Top