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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a delay to a VBE program

Status
Not open for further replies.

SRG

MIS
Jan 28, 1999
105
CA
I an reasonably new to VB and am looking to pause or delay an appliaction for a number of seconds. I have come up with this <br>
<br>
Wait = Now<br>
Do Until DateDiff(&quot;s&quot;, Wait, Now) &gt; 2<br>
Results = DoEvents<br>
Loop<br>
<br>
But this tends to pin my cpu to 100% and give me problems. I would rather it not effect my ability to go over the spreadsheet or the VBE program. <br>
<br>
Any help would really be appreciated.<br>
<br>

 
You can use either a timer control for this or if you have memoy load problems then you can use the sleep API. Just open the API viewer and copy the declaration for the sleep API in you general declaration region.<br>
<br>
<p>Ravi Kochher<br><a href=mailto:rkochher@velos.ssind.com>rkochher@velos.ssind.com</a><br><a href= > </a><br>
 
This thread has been posted recently. The discussion was adequate. Click &quot;next ten&quot; until you find it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top