VB高手帮忙!
想编一个倒计时、当时间到是弹出一个窗口的程序,可每次Label4.Caption总是只显示-1下面是代码
Private Sub Command1_Click()
a = Text1.Text
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
b = Text2.Text
End Sub
Private Sub Timer1_Timer()
a = a - 1
Label4.Caption = a
If a = 0 Then
Timer1.Enabled = False
MsgBox b, vbSystemModal, "时间到"
End If
End Sub
另外timer1.interval = 1000
刚开始时timer1.Enabled
请高手帮忙看看问题出在了哪儿?
补充:刚开始时timer1.Enabled = true
追问:dim a as ?