Option Explicit
Private Sub Form_Load()
'初始化 txtPwd 文本框
txtPwd.PasswordChar = "*"
txtPwd.MaxLength = 8
txtPwd = ""
'初始化 cmbKind 下拉列表框
cmbKind.AddItem "业务受理"
cmbKind.AddItem "证书打印"
cmbKind.AddItem "档案归档"
cmbKind.AddItem "财务管理"
cmbKind.AddItem "报表统计"
End Sub
Private Sub cmdLogin_Click()
Dim strPwd As String
strPwd = Trim(txtPwd)
Dim strKind As String
strKind = cmbKind
If strPwd = "" Then
MsgBox "请输入密码。", vbInformation, "系统提示"
ElseIf strPwd <> "admin" Then
MsgBox "输入的密码不正确。", vbInformation, "系统提示"
ElseIf strKind = "" Then
MsgBox "请选择模块。", vbInformation, "系统提示"
Else
Select Case strKind
Case "业务受理"
MsgBox "你要登录[业务受理]模块。请稍候...", vbInformation, "系统提示"
Case "证书打印"
MsgBox "你要登录[证书打印]模块。请稍候...", vbInformation, "系统提示"
Case "档案归档"
'....
Case "财务管理"
'....
Case "报表统计"
'....
End Select
End If