You are on page 1of 5

Private Sub Command1_Click()

'On Error Resume Next


'If there is some freak turn of events and there is a error, it skips it.
If Text1.Text = "" Then
MsgBox "Por Favor Ingrese Su Contraseña", vbCritical, "Sin Contraseña"
'If there was no information entered then it returns a error message box
End If
'Exit Sub
'Exits the sub so no other errors are spawned
If Text1.Text = "NEO2008" Then =CAMBNIAR NOMBRE
'NEO2008 is the password
MsgBox "Su Contraseña Es Correcta", vbInformation, "Felicitaciones"
Me.Hide =OCULTAME
Form2.Show
'If the text1 is equal to the password (reg001) then show the message box and the form
Else
MsgBox "Su Contraseña Es Incorrecta", vbCritical, "Error"
'If the password is wrong, then it returns a message box saying wrong password
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Command3_Click()
Text1 = ""
Text1.SetFocus
End Sub
Código de contraseña

Private Sub Command1_Click()

'On Error Resume Next

'If there is some freak turn of events and there is a error, it skips it.

If Text1.Text = "" Then

MsgBox "Por Favor Ingrese Su Contraseña", vbCritical, "Sin Contraseña"

'If there was no information entered then it returns a error message box

End If

'Exit Sub

'Exits the sub so no other errors are spawned

If Text1.Text = "JUANKARLPOLLERA" Then

'JUANKARLPOLLERA is the password

MsgBox "Su Contraseña Es Correcta", vbInformation, "Felicitaciones"

MeHide = OCULTAME

Form2.Show

'If the text1 is equal to the password (reg001) then show the message box and the form

Else

MsgBox "Su Contraseña Es Incorrecta", vbCritical, "Error"

'If the password is wrong, then it returns a message box saying wrong password

End If

End

End Sub
CONTRASEÑA 2 DE PROYECTO

Private Sub Command1_Click()

'On Error Resume Next

'If there is some freak turn of events and there is a error, it skips it.

If Text2.Text = "" Then

MsgBox "Por Favor Ingrese Su Contraseña", vbCritical, "Sin Contraseña"

'If there was no information entered then it returns a error message box

End If

'Exit Sub

'Exits the sub so no other errors are spawned

If Text2.Text = "ANALITICA" Then

'ANALITICA is the password

MsgBox "Su Contraseña Es Correcta", vbInformation, "Felicitaciones"

MsgBox "HOLA , " & Text1.Text & vbCrLf & "BIENVENIDO AL PROGRAMA ", vbInformation,
"Ejemplo"

MeHide = OCULTAME

Form2.Show

'If the text2 is equal to the password (reg001) then show the message box and the form

Else

MsgBox "Su Contraseña Es Incorrecta", vbCritical, "Error"

'If the password is wrong, then it returns a message box saying wrong password

End

End If
End Sub

Private Sub Command2_Click()

MsgBox "Esta seguro que desea cancelar?", 0 + vbQuestion, "ATENCION!!!"

End

End Sub

Private Sub Command3_Click()

MsgBox "ingrese de nuevo", 0 + vbInformation, "NUEVO!!!!!!!"

Text1.Text = ""

Text2.Text = ""

End Sub

You might also like