I recently coded a program on VB 6.0 Build 6.0.8176, and its giving some sort of crazy error.

While execution there are 2 reversing loops, sometimes the prog runs smooth without any error and then sometimes it errors out. I searched many places and everything lead to some sort of explaination that wasn't the case with this particular problem. MSDN says that its an error that is produced when the compiler doesnt know what kind of error it is. Even trapping the error isnt doing any good. Has anyone here ever had such experiences? If yes then please tell me how you solved if that thing ever got solved.

Thanks.