Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot Break Infinite Loop

Status
Not open for further replies.

JTBorton

Technical User
Jun 9, 2008
345
0
0
DE
Windows 7
Excel 2010

For some reason, CTRL+Break will not stop an infinite loop any more. My screen turns transparent grey and the application titles says (Not Responding), but it wont stop. Anyone know how to stop a loop in windows 7? Why the hell would they change this?

Switching to a 64 bit system has been a programming NIGHTMARE!!!!!

-Joshua
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]
 
Application.EnableCancelKey is set to xlInterrupt for the workbook, so the key combination should be able to stop the loop.



-Joshua
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]
 
You can go into the task manager and kill the session.

_________________
Bob Rashkin
 
What happens with DoEvents inside the loop?

combo
 
Bong - yah, that's what I've been doing, but it looses everything I've done if I casually forget to save before running.

combo - well there's an idea. That way I could at least push the stop button. But that only helps if I remember to put it in, and infinite loops rarely happen when you expect them. It's a good band-aid.

-Joshua
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]
 
Actually, I think I might have an idea as to why it is not working - I'm using my laptop with the lid closed and plugging in an external monitor, mouse, and keyboard. The external keyboard has a Pause | Break button, but the actual laptop keyboard does not. That may be why it doesn't recognize it.

-Joshua
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top