Controlling VBA

M

MWE

I am running Excel2000 under WindowsXP. Is there any way
to "control" VBA so that it does not take 100% of
resources should it get stuck in a loop? When this
happens I end up manually shutting off power because I can
not get WIndow's "attention". I can get to the Window's
Security window (Cntl-Alt-Del), but the buttons do not do
anything. Shutting off power is not just hitting the
switch because I am running on a laptop pulled into a
docking station. Hitting the power switch (even pulling
the plug) just switches over to battery power. I have to
manually remove the laptop from the dock and pull out the
batery to get it to stop. Great fun.

Any help would be appreciated.

Thanks
 
C

Chip Pearson

There is no way to "throttle" VBA's CPU usage. You can put a
DoEvents statement at the bottom of the loop, but the better way
is, of course, to write your loops such that you don't get
"stuck" in a loop.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
K

Ken Macksey

Usually pressing CTRL C or CTRL Break will allow you to stop the loop.

HTH

KenM
 
Top