文件名称:excel VBA登陆实验
文件大小:34KB
文件格式:XLS
更新时间:2013-12-05 10:04:55
excel
excel VBA基础登陆实验 Private Sub CommandButton1_Click() Dim myarea As Range Dim key As String key = ComboBox_name.SelText Set myarea = Sheets("sheet1").Columns(1).Find(key) If myarea.Rows.Count > 0 Then If myarea.Offset(0, 1).Value = TextBox_un.Text Then MsgBox "登陆成功!" login.Hide '隐藏窗口 Else MsgBox "用户名或密码错误!" End If End If End Sub