![]() |
#2
wmf20142018-04-09 15:23
|
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
Dim i As Integer
Private Sub UserForm_Initialize()
Dim Arr
Arr = Sheet1.Range("a1:a10")
= Application.Transpose(Arr)
End Sub
Private Sub CommandButton1_Click()
Dim username As String
Dim password As String
Dim r_rowcount As Integer
username = ComboBox1.Value
password = TextBox1.Value
r_rowcount = Sheets("sheet1").UsedRange.Rows.Count
For i = 1 To r_rowcount
If username = Worksheets(1).Cells(i, 1).Value And password = Worksheets(1).Cells(i, 2).Value Then
MsgBox "登录成功"
图片运动.Show
Else
i = i + 1
If i <= 3 Then
MsgBox "您输入的用户名或密码不正确,请重新输入"
TextBox1.SetFocus
Else
MsgBox "您输入错误超过三次,请按确定退出"
Unload Me
End If
End If
Next i
End Sub
Private Sub CommandButton2_Click()
Unload Me
End
End Sub
Private Sub Label2_Click()
End Sub
Private Sub UserForm_Click()
End Sub