以下是引用hhzjxss在2007-2-23 16:41:49的发言:登录三次关闭的代码你能在你原来的那个EXCEL的界面里面做一下吗? 关于密码输入三次的问题:和下面的类似 Application.ScreenUpdating = False Static n As Integer If Me.TextBox1.Text = Spassword(Me.ComboBox1) Then MsgBox Me.ComboBox1 & " , 欢迎你试用本系统!如有问" _ & vbCrLf & Chr(10) & "题,请与stx1980710@126.com联系!", vbInformation, "系统提示" UserName = Me.ComboBox1 Application.DisplayStatusBar = True Application.StatusBar = Space(30) & "今天是 " & Format(Date, "YYYY年M月D日") & Space(10) & "当前操作员:" & Me.ComboBox1.Value Unload Login Unload frmFace Application.Visible = True Else n = n + 1 If n > 3 Then MsgBox "密码错误,你无权使用本系统!", vbExclamation, "系统提示" Unload Login Unload frmFace ThisWorkbook.Close savechanges:=False Else MsgBox "密码错误,请重新输入,但不能超过三次!", vbExclamation, "系统提示" Me.TextBox1.Value = "" Me.TextBox1.SetFocus End If End If Application.ScreenUpdating = True |