If Text1.Text = "sqbt" Then
If Text2.Text = "123" Then
MsgBox "××欢迎您"
Else
MsgBox "密码错误!"
Text1.Text = ""
Text2.Text = ""
End If
Else
MsgBox "此用户名不存在!"
Text1.Text = ""
Text2.Text = ""
End If 说明:这里的sqbt和123分别是用户...
我简单写了一下,有3个控件:text1 输入用户名,text2 输入密码,Command1 确定假设有A 、B 两个用户Private Sub Command1_Click()If Text1.Text = "A" Then
If Text2.Text = "a123" Then
MsgBox "A,欢迎你" ...
Dim StrMyPassWord As StringPrivate Sub Form_Load()StrMyPassWord = "你设置的密码"End SubPrivate Sub Command1_Click()
If TxtPassword.Text = StrMyPassWord Then
MsgBox TxtU...