晕死,这样写肯定错啊
Private Sub Command1_Click()
If Text1.Text = "DAIzhiCAI5310" Then
r = MsgBox("口令正确,点击确定启动QQ拼音,点击取消退出程序", vbOKCancel, 启动确认)
If r = 1 Then
Shell "e:\dzc\QQPinyin_Setup_4.5.2004.400.exe"
Text1.Text = "正在启动 请稍等。。。。。。"
End If
If r = 2 Then
Unload Me
End If
Else
Text2.Text = Val(Text2.Text) - 1
If Text2.Text > 0 Then
MsgBox "第" & (3 - Text2.Text) & "次口令错误,请重新输入"
Else
MsgBox "三次输入错误,系统即将退出"
Text1.Enabled = False
Unload Me
End If
End If
End Sub
排列正确后明显少了两个endif啊,不过我估计我这种排列方法到不到你的设计思路,但是回答你的问题还是够了的,总之if 跟endif 的数量要一样多
你里面有4个If 而你的End If 只有3个