Creo que algo así tendría que funcionar. No lo he probado.
Código :
Ver originalFor i = 1 To 5 Step 1
If Intento = 3 Then
MsgBox("Error.")
Exit For
Else
If BoxUsuario.Text = Matriz1(i) Then
If BoxContrasena.Text = Matriz2(i) Then
MsgBox("Exito.")
Intento = 0
Exit For
Else
MsgBox("Contraseña incorrecta.")
Intento = Intento + 1
Exit For
End If
End If
End If
Next i
If i > 5 Then
MsgBox("Usuario incorrecto.")
Intento = Intento + 1
End If
Como es tu código lo entenderás mejor y podrás repararlo si hay un fallo.
También te recomiendo usar UBound para saber el tamaño de la matriz, en lugar de usar números fijos como el 5.
Saludos