Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time Delay
To All,
I have a vba code that seems to be going too fast for its' own good. When I "Step Into" the code and watch each step slowly, everything works fine, but when I play the macro it deletes more information that shouldn't be deleted. Is there a way to pause the code, say for a few seconds, so that the computer could "catch up" with itself and not jumble the code? I know of other code-based programs that do this, and I thought excel may be able to also. Thanks much! Jeff --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time Delay
Look at Wait in help.
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Kilcup " wrote in message ... To All, I have a vba code that seems to be going too fast for its' own good. When I "Step Into" the code and watch each step slowly, everything works fine, but when I play the macro it deletes more information that shouldn't be deleted. Is there a way to pause the code, say for a few seconds, so that the computer could "catch up" with itself and not jumble the code? I know of other code-based programs that do this, and I thought excel may be able to also. Thanks much! Jeff --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time Delay
The following will give .5 sec delay
put the follwoing at the top of the module Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 'put this where you want the code to pause sleep 500 But by all rights this wouldn't fix up your problem. It sounds as though you have got the code looping through more events than you originaly planned. I would double check the code. by putting a msgbox near your loop to doublecheck "Kilcup " wrote in message ... To All, I have a vba code that seems to be going too fast for its' own good. When I "Step Into" the code and watch each step slowly, everything works fine, but when I play the macro it deletes more information that shouldn't be deleted. Is there a way to pause the code, say for a few seconds, so that the computer could "catch up" with itself and not jumble the code? I know of other code-based programs that do this, and I thought excel may be able to also. Thanks much! Jeff --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time Delay
Thanks for the help... simple answer, but it does the trick. Have
great day. Jef -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Time formulae - delay updating when the sheet is refreshed | Excel Discussion (Misc queries) | |||
time delay refresh on random number | Excel Worksheet Functions | |||
Time delay in displaying charts & chart names | Charts and Charting in Excel | |||
Time Delay for Macros | Excel Discussion (Misc queries) | |||
Long Time Delay To Paste From UserForm To Sheet | Excel Worksheet Functions |