For Loop in VB6 doesn’t respond. Why?

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?
