Click to See Complete Forum and Search --> : setting timer to one hour


usin
July 20th, 2000, 05:42 AM
how do i set a timer to one hour.

the following code does not work

Private sub cmdTime_click
while count =< 600
timer.enabled = true
count = count + 1
wend
End Sub

John G Duffy
July 20th, 2000, 06:55 AM
Option Explicit

Private Sub Command1_Click()
Label1 = Now
Timer1.Interval = 60000
Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
Static X
X = X + 1
If X = 60 Then
Beep
Label2 = Now
Timer1.Enabled = False
End If
End Sub


John G

usin
July 20th, 2000, 08:19 AM
thank you, John.

it works!.

i wonder why my first coding (using while..wend) did not work.

usin.