-
I know this might sound stupid... But i have just started using VB(i am only 15) and I was wondering how to show time in a label counting down from 5 minutes. Thank you a lot for your time.
P.S. I am not an expert so please use human language.
Michael Baynham
-
Code:
Private Sub Form_Load()
Timer1.Interval = 500
End Sub
Private Sub Timer1_Timer()
Static tTimer As Single
If tTimer = 0 Then tTimer = Timer
If (Timer - tTimer) > 300 Then Exit Sub
Label1 = Format(DateAdd("s", 300 - (Timer - tTimer), Date), "nn:ss")
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Thank you very much for your time.
Michael Baynham