帮助登录表单 [英] Help with login Form

查看:73
本文介绍了帮助登录表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

代码是:


选项明确


Public LoginSucceeded As Boolean


Private Sub cmdCancel_Click()

''将全局变量设置为false

''表示登录失败

LoginSucceeded = False

结束子


私人子cmdOK_Click()

''检查密码是否正确

如果txtPassword =" "然后

''将代码放到这里以将

''成功传递给调用子

''设置全局var是最简单的

LoginSucceeded = True


Else

MsgBox"密码无效,请再试一次!",登录

txtPassword.SetFocus

SendKeys" {Home} + {End}"

结束如果

End Sub


我想这样做,如果用户输入密码并且有效,但我已经尝试了


" ;私人子cmdOK_Click()

''检查密码是否正确

如果txtPassword = 0那么

''将代码放在这里以通过

''调用子的成功

''设置全局var是最简单的

LoginSucceeded = True"


但它没有用,请帮助任何人
< br $>
Yoda(加拿大Eh)

The code is:

Option Explicit

Public LoginSucceeded As Boolean

Private Sub cmdCancel_Click()
''set the global var to false
''to denote a failed login
LoginSucceeded = False
End Sub

Private Sub cmdOK_Click()
''check for correct password
If txtPassword = "" Then
''place code to here to pass the
''success to the calling sub
''setting a global var is the easiest
LoginSucceeded = True

Else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub


I want to make it so if the user puts in their password and it works, but i have tried

"Private Sub cmdOK_Click()
''check for correct password
If txtPassword = 0 Then
''place code to here to pass the
''success to the calling sub
''setting a global var is the easiest
LoginSucceeded = True"

But it didn''t work please Help anybody

Yoda (Canada Eh)

推荐答案

对不起我想出来的任何一小时一个很抱歉给你们带来麻烦


Se ya


Yoda(加拿大Eh)
Sorry i figured it out just Any Hour a go sorry to trouble you guys

Se ya

Yoda (Canada Eh)



对不起我想出来只是任何一小时一个很抱歉让你们麻烦你们b $ b
Sorry i figured it out just Any Hour a go sorry to trouble you guys



:)这对每个人来说都是最好的结果。


这些档案是一个很好的信息来源。所以为了将来参考,您能否告诉我们您如何解决问题?这样,如果其他人来寻找相同的答案就会在这里。

:) That''s probably the best result for everybody.

These archives are a great source of information. So for future reference, could you give us some idea of how you resolved the problem? That way it will be here if someone else comes looking for the same answer.


我回答是


私人子cmdOK_Click()

''检查密码是否正确

如果txtPassword = txtPassword那么

''将代码放在这里以传递

' 成功调用sub

''设置全局变量是最简单的

LoginSucceeded = True"


所以当一些bdoy登录使用他们的密码而不是你编写的密码。


唯一的变化是如果txtPassword = txtPassword
I answer was

Private Sub cmdOK_Click()
''check for correct password
If txtPassword = txtPassword Then
''place code to here to pass the
''success to the calling sub
''setting a global var is the easiest
LoginSucceeded = True"

so when some bdoy logins in it uses their password instead of the one you made up.

the only change was If txtPassword = txtPassword


这篇关于帮助登录表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆