First of all make a backup of you excel files before you run the macro in case something goes wrong so you don't mess up your data.
Since I did not study you macro setup properly I missed how things works together i.e. from the main macro you call 4 sub macros in order to organize the data in the files. So you did not do anything wrong, it was my faulty understanding of the problem that messed things up. Sorry about that.
After the first macro has done it's job by transferring / changing data in the opened file macro jumps back to main macro and execute next line that calls the
second macro who modifies data and macro jumps back to main macro and third sub macro is called and so forth
The problem (my bad as I did not realize how these macros were called from the main macro) is found in the end of the last macro
"Sub AddCartonLabels(ws As Worksheet)"
Change the lines:
to
As the extra lines are found in the "Sub ModFiles" macro and when all lines in macro 4 is processed macro jumps back to "Sub ModFiles" and then do the
before it opens the next file in the folder.
Well I must say I did learn quite a bit from your problem and interesting to see how one can split a long macro into several small stand alone macros.
Alf
Bookmarks