N
Nick T
Hi,
With help from various.....
I have a form with various timers on it which currently only works in
minutes & seconds. I have the following code in my on timer event, however i
want my timers to be able to run into hours as well as the minutes & seconds
- any suggestions what changes i need to make to the following code in order
to do this:
Private Sub Form_Timer()
If DateDiff("s", Now, dteStartTime) < 0 Then
Me.Text4 = "Check Required"
Me.Text4.BackColor = vbRed
varCounter = "00:0" & Int(DateDiff("s", dteStartTime, Now) / 60)
varCounter = varCounter & ":" _
& Right("0" & DateDiff("s", dteStartTime, Now) Mod 60, 2)
Me.Timer2 = varCounter
Else
varCounter = "00:0" & Int(DateDiff("s", Now, dteStartTime) / 60)
varCounter = varCounter & ":" _
& Right("0" & DateDiff("s", Now, dteStartTime) Mod 60, 2)
Me.Timer1 = varCounter
End If
End Sub
Thanks for any help!
With help from various.....
I have a form with various timers on it which currently only works in
minutes & seconds. I have the following code in my on timer event, however i
want my timers to be able to run into hours as well as the minutes & seconds
- any suggestions what changes i need to make to the following code in order
to do this:
Private Sub Form_Timer()
If DateDiff("s", Now, dteStartTime) < 0 Then
Me.Text4 = "Check Required"
Me.Text4.BackColor = vbRed
varCounter = "00:0" & Int(DateDiff("s", dteStartTime, Now) / 60)
varCounter = varCounter & ":" _
& Right("0" & DateDiff("s", dteStartTime, Now) Mod 60, 2)
Me.Timer2 = varCounter
Else
varCounter = "00:0" & Int(DateDiff("s", Now, dteStartTime) / 60)
varCounter = varCounter & ":" _
& Right("0" & DateDiff("s", Now, dteStartTime) Mod 60, 2)
Me.Timer1 = varCounter
End If
End Sub
Thanks for any help!