Hi. I am new at all this, and have had tons of help with the below macro, but now we're needing someone to maybe review it and see where we've gone wrong. I am fully lost at this point, so any help would be greatly appreciated.
The left table is partial from the workbook that this macro will be saved to.
The right table is in another workbook called directory.xls (used for reference by the macro).
I’ve entered the variables used in the code to the tables for reference.
This Sheet
B.............D
pnum........qty
Directory.xls
A..........B........C
dnum.....dfol.....file
What we’re trying to do with the macro is :-
1. look at “pnum”, if this cell is blank then the macro ends.
2. If “pnum” contains an entry then it looks to “qty”, if this is blank or 0 then it looks at pnum in the next row.
3. When it finds “qty” greater than 0 it needs to search “dnum” in the directory to find an exact match for “pnum” exiting if no match is found. (thinking message and back to next row in #2 instead).
4. It then needs to take the text of “dfol” in the same row and pass that to the next part of the code as the source directory for the file copy, with “file” being the filename to copy.
5. After this is done it then needs to return to the top of the loop and look at the next entry in #2
Bookmarks