For Loop in VB6 doesn’t respond. Why?

Asked By 0 points N/A Posted on -
qa-featured

I am working in VB6 to develop a customized desktop application. The following code is a simple part of my software, and it normally works well. However, sometimes when I press the associated button, it mimics a shut down operation (Ctrl+Alt+Del,  End Task).  As only that code is associated with the button, I think the problem lies with the code. Can I get an answer to this mysterious problem?

SHARE
Answered By 0 points N/A #122413

For Loop in VB6 doesn’t respond. Why?

qa-featured

Hello Nsmaskq

As you have deduced, the problem is in the for loop. Check your logical expression to make sure you are not getting into an infinite loop in your loop structure. Verify the code to ensure that your loop has an exit for all conditions – it is common to miss some conditions, especially if you have complicated code. One way to prove that the fault lies in the loop structure is simply to force it to stop on the first or second loop. If this resolves the issue,  then the loop structure is really the culprit.

Login/Register to Answer

Related Questions