Código
Private Sub Command1_Click() Dim cont As Integer cont = 0 Do While cont < 3 If user.Text = "user" And pass.Text = "prueba" Then Unload Me Form2.Show Else cont = cont + 1 MsgBox "Contraseña inválida No " & CStr(cont), vbCritical user.Text = "" pass.Text = "" End If Loop MsgBox "Adios...", vbInformation Unload Me End Sub Private Sub Command2_Click() Unload Me End Sub