Private Sub Command1_Click()
Dim name, mima As Single
name = Text1.Text
mima = Val(Text2.Text)
If name = "abc" And mima = 123456 Then
MsgBox "登陆成功", vbOKOnly, "恭喜你。。"
Else
MsgBox "登录失败", vbOKOnly, "提示"
Text1.SetFocus
End If
End Sub
Private Sub Command2_Click()
If name <> "abc" Or mima <> 123 Then
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End If
End Sub
- THE END -
Category: Vbs
0 条评论。