by Patrick K. Bigley (14 Submissions)
Category: Math/Dates
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (10 Votes)
A delay timer so easy, this paragraph is longer. I had to submit this easy code because it is not on this website. Uses no API, and it is very handy!!
Assumes
Make a form with a command button ont it. Paste the code into the command button. This sample has a 3 second delay, then you hear a beep.
Private Sub Command1_Click()
Dim Start As Long
Start = Timer
Do While Timer < Start + 3 'a 3 second delay (Change to any numer you want)
DoEvents ' Yield to other processes.
Loop
Beep
End Sub