Windows 7 Forums


Reply
Thread Tools

Excel 2010 screaming loop problem

 
 
John Jones
Guest
Posts: n/a
Thanked:
 
      04-19-2012

I am running Excel 2010 under windows 7 64 bit home premium.

I occasionally (ahem) make mistakes within VBA so that it enters a
screaming loop.

Sometimes I can break in with the pause/break key. But when the loop is
tight Excel greys out and task manager has to be invoked to kill it.

I wrote a test as follows:
Sub test()
' investigate screaming loop problem
Dim i As Integer
Application.EnableCancelKey = xlErrorHandler

i = 0
While i = 0
i = 0
Wend
End Sub

I find that I can set this off and break into it.

Unless I click on the active window first.

The only other thing is that I have the Xnumbers add-in installed but
not activated. I know that this does some dodgy things with the enable
cancel key setting but it should be ok if not currently active?

(BTW Xnumbers is a free mathematical toolpack which I find useful.)

Can anyone help?
Cheers
JJ
 
Reply With Quote
 
 
 
 
Philip Herlihy
Guest
Posts: n/a
Thanked:
 
      04-19-2012
In article <>,
says...
>
> I am running Excel 2010 under windows 7 64 bit home premium.
>
> I occasionally (ahem) make mistakes within VBA so that it enters a
> screaming loop.
>
> Sometimes I can break in with the pause/break key. But when the loop is
> tight Excel greys out and task manager has to be invoked to kill it.
>
> I wrote a test as follows:
> Sub test()
> ' investigate screaming loop problem
> Dim i As Integer
> Application.EnableCancelKey = xlErrorHandler
>
> i = 0
> While i = 0
> i = 0
> Wend
> End Sub
>
> I find that I can set this off and break into it.
>
> Unless I click on the active window first.
>
> The only other thing is that I have the Xnumbers add-in installed but
> not activated. I know that this does some dodgy things with the enable
> cancel key setting but it should be ok if not currently active?
>
> (BTW Xnumbers is a free mathematical toolpack which I find useful.)
>
> Can anyone help?
> Cheers
> JJ


Look up the DoEvents function in Help. This passes control back to
Windows for long enough for Windows to respond to events outside the
application. It will have a 'cost' in processing terms, so it's
typically invoked every second rather than every microsecond.

Note that you'll probably get more replies on a topic like this from a
VBA newsgroup - I'm seeing this in a Windows 7 one!

--

Phil, London
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OT: Excel problem Scott alt.windows7.general 2 02-20-2013 09:51 AM
Reboot Loop Problem zych80 General Discussion 22 05-08-2012 04:06 PM
Toshibat loop satellite L510 reboot loop sinnyau1 Installation, Setup and Updates 3 03-06-2011 08:33 AM
Office 2010 & Outlook 2010 billblackhome Software 9 01-14-2011 11:07 PM
Excel slower than with XP mtheriault Software 4 10-06-2009 06:12 PM


All times are GMT +1. The time now is 01:22 AM.
W7Forums is an independent website and is not affiliated with Microsoft Corporation.