Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Controlling VBA

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Controlling VBA

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


"MWE" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Controlling VBA

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

HTH

KenM


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
controlling worksheets using combo-box Sunil Sagar Excel Worksheet Functions 1 January 28th 09 05:49 AM
Controlling Userforms harrysfan New Users to Excel 1 August 30th 06 12:47 PM
Controlling Sequence HS Excel Discussion (Misc queries) 0 March 15th 05 02:15 PM
Controlling the mouse Brian Sharf Excel Programming 1 July 21st 03 08:24 AM
Controlling two different printer trays Luc Dansereau Excel Programming 1 July 14th 03 05:47 AM


All times are GMT +1. The time now is 12:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"