Unpredictable macro crash
Hello everyone,
I'm facing a complex and apparently insoluble problem with macro execution.
The code is launched by a Visual Basic Sendkeys instruction from another application and does the following actions:
- Reads data from a text file and stores them into an LTAB;
- Deletes the text file;
- Sets a part name; check if already exists, deletes it, creates a new part with that name;
- Draws a table starting from 0,0 and fills it with stored data;
- Adds all data as Info to the part;
- Prints a pdf file of the table;
- Deletes the table heading text;
- Goes to Top, executes a Modify Move action taking the table and leaving it hanging to the mouse pointer.
Everything worked fine on seven Workstations for about ten years; a couple of months ago it began giving problems on one single PC (which is the same as mine): the code hangs or ends in a random looking way.
From time to time it fails before deleting the existing table, deletes it and ends, begins filling the table and ends after a variable number of records, hangs at the attribution of Info, finishes before printing pdf.
In normal executions, it never reaches the Modify instruction; instead, setting up a Breakpoint, the step-by-step running succeeds without issues.
Since we needed to replace another Workstation, we decided to buy the new one for this user and set it up without cloning the disk to solve the problem; well, the new WS has the same problem.
I tried inserting multiple Wait instructions to give the interpreter some time to reflect with no success.
Has anyone experienced such problems?
Thank you
Marco

