I'm working on a timer program and am having trouble writing the code to make a timer count down from a number that the user would enter. Any one have suggetions???
Thanks!
Printable View
I'm working on a timer program and am having trouble writing the code to make a timer count down from a number that the user would enter. Any one have suggetions???
Thanks!
seconds? minutes?
seconds:
enteredtime = wherever it comes from (textbox...inputbox)
set timer1.interval = 1000 (1000 per second)
Private Sub timer1_timer()
enteredtime = enteredtime - 1
label1 = enteredtime
end sub
minutes set timer interval = 60000
Hi again!
I need my timer to show minutes and seconds as it counts down. Syntax for that??? My book's section explaining timers and date/time syntax is terrible...
Raye...
VB Code:
Dim tm As Integer Private Sub Form_Load() Timer1.Interval = 1000 tm = InputBox("enter minutes") tm = tm * 60 End Sub Private Sub Timer1_Timer() tm = tm - 1 Label1 = Int(tm / 60) & ":" & (tm Mod 60) End Sub
just a sample...:)
Thanks for the help!
Code:Label1 = Int(tm / 60) & ":" & (tm Mod 60) ;)
Let's say "pno" is the time of now. which is the command "Time".
so
Dim pno as string
pno = Time
and if the user haven't set the Current Form to Focus, in 5 minutes, the MSGBOX will popup.
How do you do that, Expert?