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!

Pausing VB

Status
Not open for further replies.

pds

Programmer
Jul 2, 2001
9
US
A vb program starts. It runs through its calculations, and sometime at a certain arbitrary point the program pauses for a few seconds, say 2.5, and then continues until it finishes.

Is there a way to do this?
 
Copy this into a module and call it by Sleep 2000
The above would 'pause' the app for 2 seconds

Option Explicit

Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
 
Although the sleep function would be my first choice, you could also use the Timer function. There should be plenty of help available in VB for this method.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top