肯请各位高手帮助我一个刚入门菜鸟.
写的不好,自己改改吧.一个按钮,两个时钟
Dim NumStr As Integer
Dim TxtStr$
Private Sub Command1_Click()
TxtStr = Text1
NumStr = CInt(TxtStr)
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
If NumStr > 0 Then NumStr = NumStr - 1
Text1 = CStr(NumStr)
If NumStr = 0 Then Timer1.Interval = 0: Timer2.Interval = 1000
End Sub
Private Sub Timer2_Timer()
If NumStr < CInt(TxtStr) Then NumStr = NumStr + 1
Text1 = CStr(NumStr)
If NumStr = CInt(TxtStr) Then Timer1.Interval = 1000: Timer2.Interval = 0
End Sub