VB问题,请大师帮看一下。

来源:百度知道 编辑:UC知道 时间:2024/09/21 08:27:49
Private Sub Command3_Click()
If Command3.Caption = "暂停" Then
Timer1.Enabled = False
Command3.Caption = "自动复制"
End If
If Command3.Caption = "自动复制" Then
GoTo abcd
End If
If Command3.Caption = "重新自动复制" Then
num = 0
GoTo abcd
End If

abcd:
If Text5.Text > 0 Then
Timer1.Enabled = True
Timer1.Interval = Text5.Text * 1000
Command3.Caption = "暂停"
Else
MsgBox "请输入每次自动复制的间隔时间。"
End If
End Sub

以上程序为什么点一下就会时间控件就会为真,再点一下怎么不会为假啊?

Private Sub Command3_Click()
If Command3.Caption = "暂停" Then
Timer1.Enabled = False
Command3.Caption = "自动复制"
GoTo efgh
End If
If Command3.Caption = "自动复制" Then
GoTo abcd
End If
If Command3.Caption = "重新自动复制" Then
num = 0
GoTo abcd
End If

abcd:
If Text5.Text > 0 Then
Timer1.Enabled = True
Timer1.Interval = Text5.Text * 1000
Command3.Caption = "暂停"
Else
MsgBox "请输入每次自动复制的间隔时间。"
End If
efgh:
End Sub

Private Sub Command3_Click()
If Command3.Caption = "暂停" Then
Timer1.Enabled = False
Command3.Caption = "自动复制" 这里的Command3.Caption已经改变了
End If
If Command3.Caption = "自动复制" Then 这里的判断就是真了,会执行 goto
GoTo abcd
End If
If Command3.Caption = "重新自动复制" Then
nu