求大家帮忙,用vb做一个倒计时器为什么会溢出?
Option ExplicitDim n As Long
Dim dt As Date
Dim date1 As Date
Dim date2 As Date
Private Sub Command1_Click()
Timer1.Enabled = True
date1 = Time
date2 = Format(Text1.Text, "hh:mm:ss")
dt = date1 + date2
End Sub
Private Sub Form_Load()
Text1.Text = "00:01:00"
End Sub
Private Sub Timer1_Timer()
n = DateDiff("s", Time, dt)
Label1 = Format(TimeSerial(0, 0, n), "hh:mm:ss")
If n = 0 Then End
End Sub