Edit.: Solved
Edit.: Solved
Last edited by RikNazareth; 08-07-2017 at 05:53 AM. Reason: wrong code
Hi RikNazareth
Welcome to the forum.
If I understand your request correctly, i.e. You have a list of filenames in a column that are stored in a Folder.you want this entire file list to be moved to a folder that you choose via a picker. if so, this code does just that.
Please Login or Register to view this content.
Good Luck
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the star to left of post [Add Reputation]
Also....add a comment if you like!!!!
And remember...Mark Thread as Solved.
Excel Forum Rocks!!!
Hello @sintek
Thank You, first off all.
I try the code u made, but i got some problems:
- The code isn't founding the numbers or names at column A, so it canīt copy it. And for every range he ready, he is giving the error:
http://imgur.com/a/4A3U3
I can leave some printīs or send u if need.Please Login or Register to view this content.
Another thing, its possibly to change the error box? Because if i put A1 to A200 i have too click 200 times at the error hehe.
Regards
Where is the numbers or names stored if not in Range("A1:A200")The code isn't founding the numbers or names at column A
Difficult to say without a sample file upload...
Hi sintek,
Ok let me see if i can explain it.
Everyday we have a excel file coming whit numbers, it can be 10, but can be more then 200. We copy the number to this file (link below), for the "sheet1" column A:
https://ufile.io/07sk0
The code u gave me i gonna put a button there.
After this, he goes at path "Z:\VODAFONE\Por Validar" and see if the exist a folder whit the same number(s) that are at the column A. For every number found, the code should cut & pass for the path choose (from the picker).
If he donīt find one or more numbers, its possible that only show one error box whit the numbers not found?
Hope i was clear about it. If u need anything else, or more information please tell me.
Thank You
To attach a file, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.
I upload the file sample for u too see.
Okay, I don't know why on earth I was thinking we are moving files...
Herewith code to move the folders...Has been tested and works...
Please Login or Register to view this content.
Its saying variable not defined:
Untitled.png
Anything im doing wrong?
Sorry Just add
Please Login or Register to view this content.
Erro 13
Untitled.jpg
If you encounter an error click "Debug" then a yellow line will be highlighted. Copy that yellow line to let us know the position of the error ..
< ----- Please click the little star * next to add reputation if my post helps you
Visit Forum : From Here
Its says its here:
For i = LBound(FoldArr) To UBound(FoldArr)
Untitled.jpg
Tests perfectly my side...
Edited...
Declare i as Long!!!
Last edited by sintek; 07-25-2017 at 12:01 PM.
Edit: Same thing:
Untitled.jpg
Last edited by RikNazareth; 07-25-2017 at 12:10 PM.
Please Login or Register to view this content.
Did it. Same error !
Weird !!! Can be the version of excel?
Hello
Try this code. I didn't change a lot and this worked fine for me
Please Login or Register to view this content.
Hello @YasserKhalil
Thank you for your help. But still gives the same code line error.
Untitled.jpg
I turn on Microsoft Scripting Runtime, still donīt work. seems so close to be working, and then so far argh !!!
Any thing we can try to solve this?
Not to sure hey...Both codes...individually...tests perfectly.
Are you using the upload that you posted to test on...
Is your Info in Range A1 down.....
Hi,
Im putting the code at this file, cant use forum upload because it have 2.5mb.
I created 4 folders whit numbers, and put some files inside, and i try to send them to the other folder to test. But keeps giving the erro.
Can u test whit this file?
http://www.filedropper.com/vodafone-geradoramostrarn2
Other thing is. the Z.: itīs a local harddisk, its a intranet storage we have it. dunno if that can cause the problem.
Last edited by RikNazareth; 07-26-2017 at 05:15 AM.
Found the cause...You only have one value stored in your array...Only A1.value...Hence the error...No loop to go through....
Last edited by sintek; 07-26-2017 at 06:03 AM.
Yap both codes work prefect whit more then 1 number.... OMG
Thanks alot guys
Glad we could help. thanks for rep + and please mark thread as solved...
Hello again guys,
The code is making is job, the problem now is, since we stop pass the folders one by one, we donīt check if there is files inside the folder.
So my question is, itīs possible when i choose the path to move the folder the program make two things:
1š This is to implement at the code working already - If the folder in column A do not exit, identify the folder, maybe create a .txt (notepad) whit the folders he didn't find.
2š And this maybe have to be made for another button - Run the folderīs and column A is a certain path (using the picker), and check if there exist files inside. If do not exist create the .txt / msg box (something lol) whit the folder(s) that donīt have files inside.
This will guarantee that no folder are missing at the path we choose, and if they are we quickly know which one.
And if exist folder(s) whit no files inside, we can quickly know which one too.
This will help a lot if possible, since we lose a lot of time whit this.
Best Regards
Last edited by RikNazareth; 08-03-2017 at 12:37 PM.
Hello Guys,
Anyone can help?
Regards
Here you go....This what you are looking for....creates and writes to a Txt file called Info
Please Login or Register to view this content.
Works :D
Thank you very much.
Pleasure as always...thanks for rep +
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks