[求助]vb中,如何把x的值填到代码中
例如Select Case t1.Text
Case "sdcdwsc"
If t2.Text = 19931022 Then
Timer2.Enabled = False
MsgBox "欢迎"
Shell ("f:\123.cmd")
End
Else
Timer2.Enabled = False
MsgBox "密码错误,退出!", vbCritical, "error"
End
End If
Case "sdcdwt"
If t2.Text = "196739" Then
Timer2.Enabled = False
MsgBox "欢迎"
Shell ("f:\321.cmd")
End
Else
Timer2.Enabled = False
MsgBox "密码错误,退出!", vbCritical, "error"
End
End If
Case "sdcdtzz"
If t2.Text = "680711" Then
Timer2.Enabled = False
MsgBox "欢迎"
Shell ("f:\213.cmd")
End
Else
Timer2.Enabled = False
MsgBox "密码错误,退出!", vbCritical, "error"
End
End If
'我想把x的值导入到这里
Case Else
Timer2.Enabled = False
MsgBox "用户名错误,退出", vbCritical, "error"
End
End Select
x的值为
Case "xxx"
If t2.Text = "123456" Then
Timer2.Enabled = False
MsgBox "欢迎"
Shell ("f:\213.cmd")
End
Else
Timer2.Enabled = False
MsgBox "密码错误,退出!", vbCritical, "error"
End
End If
谢谢了!!