Hi,
I have a setup made with iterations, where it splits to multiple files according to the ID code in one of the excel files, I made a test with a file that contains 60 codes, but the loop always seems to stop at iteration 8. No matter the number of codes I remove, it always stops at iteration 8.
At first I thought it could be system resources, but my machine goes maximum at 45% capacity.
The issue seems to be in the final step when it is calling the macro to run.
I always get the following errors:
Error: Iteration of module “Main” failed on iteration #8.
Source: action “Iterate”, table “File_XXXXXXxlsx”
Called module: module “Main”
Overridden parameters:
{Code ID} = XXXXXX
Error: System call failed. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL_FAILED))
Source: action “Excel command (experimental)”, table “To Add List of Values to the Excel - Final Step - RUN MACRO”
Made a couple more tests, removing the Iteration condition “halt on error” and leaving it to continue on error.
It seems that iteration still stops at 8, leaving that file still open, you can see it in the Task Manager, but it then proceeds to the rest of the iterations, but at some point it does not process the whole VBA statement, the machine keeps running fine at 45% max memory usage and around 25% CPU, so all good here.
I’m not sure what’s causing this error, but I was able to make your project successfully complete at least 12 iterations by adding a delay to your macro after the second call to the Save() method with the following line:
Application.Wait (Now + TimeValue("0:00:10"))
Can you please check this fix on your side? Will you be able to run successfully all the iterations?
Hi @andrew.rybka,
I added that and removed one of the saves in the end, while it processed all data and returned all files, the error still happened at the iteration 11 in first then and then again in the 8 in the second test, but all files were created.
If you haven’t found a solid solution for this yet, where errors don’t occur at all, I’d be happy to take a look at it for you. I spend most of my days in EasyMorph and Excel VBA.
Hi @CraigT,
That would be great, I moved to another computer and it worked fine, but moment I add more lines of code (simple color and border), and issue appeared again. I will message you. Thanks a lot in advance.