ccdtzccdtz
New Member
- Joined
- Mar 18, 2015
- Messages
- 1
I have used VBA to code a small program (couple thousand lines) that operate a pretty complicated process and create outputs of many records. Recently we've been trying to test it on different machines and problems come up. 4 out of 6 computers generated same and correct outputs while the other two didn't. But while I rerun this program on these two, they seemed to work just fine. I checked the result of the two wrong outputs, inconsistencies happened on two different records. My clues so far:
1. 4 out 6 computers (Same Excel and Windows 7) use this program just fine which suggests nothing wrong with the coding;
2. If I re-run the other two, they also generate right result, which also suggests the program works fine;
3. The fact that wrong records in those two unsuccessful files are different rows suggests the error is random;
4. In the output file, two records form a row and many rows are generated from the main loop. For the two wrong records, the problem is always, for some reason, current loop didn't work property and used result from previous loop. But next loop worked fine. Random loop breakdown?
Sorry I couldn't attach my code here because it is too long and I am not allowed to publish it. I also don't think it is due to bugs from the VBA code. It sounds to me, is certain windows real-time operations interfere my program but I am not sure. And yes, when I used those computers to run my program, it was running in the background so my colleagues were operating normally on those computers.
Also, if this is random, is there anyway to prevent this from happening or at least detecting it?
1. 4 out 6 computers (Same Excel and Windows 7) use this program just fine which suggests nothing wrong with the coding;
2. If I re-run the other two, they also generate right result, which also suggests the program works fine;
3. The fact that wrong records in those two unsuccessful files are different rows suggests the error is random;
4. In the output file, two records form a row and many rows are generated from the main loop. For the two wrong records, the problem is always, for some reason, current loop didn't work property and used result from previous loop. But next loop worked fine. Random loop breakdown?
Sorry I couldn't attach my code here because it is too long and I am not allowed to publish it. I also don't think it is due to bugs from the VBA code. It sounds to me, is certain windows real-time operations interfere my program but I am not sure. And yes, when I used those computers to run my program, it was running in the background so my colleagues were operating normally on those computers.
Also, if this is random, is there anyway to prevent this from happening or at least detecting it?