alcorjr
Active Member
- Joined
- Dec 29, 2002
- Messages
- 416
I guys I'm trying to have this little script run from ENTER, and it's not doing it. Any ideas?
Thanks
Code:
Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
TextBox1.EnterKeyBehavior = True
If KeyAscii = 13 Then
pwd = Me.TextBox1.Text
If Me.TextBox1.Text <> "" Then
If pwd = "matri" Or pwd = "leogr" Or pwd = "kgbkgb27" Then
Me.TextBox1.Text = Empty
Exit Sub
Else:
If Me.TextBox1.Text <> "" Then
Dim msg9 As String
msg9 = "El password no es correcto"
CreateObject("WScript.Shell").Popup msg9, vbSystemnomode
Me.TextBox1.Text = Empty
pwd = Empty
End If
End If
End If
End If
End Sub
Thanks