|
-
Oct 20th, 2000, 09:28 AM
#1
Thread Starter
New Member
I need to know how to make one text box and one command button to be able to use 3 differant passwords.
ive tried:
If Pass.Text = "pass1" Then
MsgBox "Right",,"Right"
Else
MsgBox "Wrong",,"Wrong"
End If
If Pass.Text = "pass2" Then
MsgBox "Right",,"Right"
Else
MsgBox "Wrong",,"Wrong"
End If
If Pass.Text = "pass3" Then
MsgBox "Right",,"Right"
Else
MsgBox "Wrong",,"Wrong"
this dosn't work... please help
-
Oct 20th, 2000, 09:33 AM
#2
Junior Member
Code:
If Pass.Text = "pass1" Then
MsgBox "Right", , "Right"
ElseIf Pass.Text = "pass2" Then
MsgBox "Right", , "Right"
ElseIf Pass.Text = "pass3" Then
MsgBox "Right", , "Right"
Else
MsgBox "Wrong", , "Wrong"
End If
-
Oct 20th, 2000, 09:35 AM
#3
Frenzied Member
what you can do :
Code:
Private Sub Command1_Click()
Dim pass As String
ok = False
For x = 1 To 3
pass = Choose(x, "password1", "password2", "password3")
If pass = pass.Text Then ok = True
Next x
End Sub
-
Oct 20th, 2000, 09:35 AM
#4
Thread Starter
New Member
i'm pretty new to vb thank u for the help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|