VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This code counts from one number to another at specified intervals. I didn't see this anywhere and

by Rev (4 Submissions)
Category: Math/Dates
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Originally Published: Fri 11th February 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This code counts from one number to another at specified intervals. I didn't see this anywhere and it is very usefull.

API Declarations


' It is just a standard timeout.bas

Sub TimeOut(Duration)
starttime = Timer
Do While Timer - starttime < Duration
DoEvents
Loop

End Sub

' Example :
'
' TimeOut (3)
' Waits for 3 seconds


Rate This code counts from one number to another at specified intervals. I didn't see this anywhere and



' Make 1 command button on your form.
' Place this code inside the command button

Text1 = "1"             ' Begin counting at 1
start:
addme = 1               ' Change this to the amount you want to add.
Text1 = Text1 + addme   ' Add the value of addme {1} to the value of the textbox
Call TimeOut(1)         ' Wait for 1 second.
GoTo start              ' Loops the process.

Download this snippet    Add to My Saved Code

This code counts from one number to another at specified intervals. I didn't see this anywhere and Comments

No comments have been posted about This code counts from one number to another at specified intervals. I didn't see this anywhere and . Why not be the first to post a comment about This code counts from one number to another at specified intervals. I didn't see this anywhere and .

Post your comment

Subject:
Message:
0/1000 characters