Hallo,

ich bin gerade am vb6 lernen und habe nun eine frage. Da ich nun schon weiß wie man anhand einer if anweisung einen passwortschutz erstellt nämlich so:

Code:
Dim passwort As String
passwort = txt_eingabe_passwort.Text

    If passwort = "test" Then
    lbl_ausgabe.Caption = "Login erfolgreich"
    Else
    lbl_ausgabe.Caption = "Login fehlerhaft"
    End If
wollte ich einmal fragen wie ich ein login mit username UND passwort hinbekomme.

Code:
Dim passwort As String
passwort = txt_eingabe_passwort.Text

Dim username As String
username = txt_eingabe_username.Text

    If passwort = "test"
    If username = "test" Then
    lbl_ausgabe.Caption = "Login erfolgreich"
    Else
    lbl_ausgabe.Caption = "Login fehlerhaft"
    End If
funktioniert schonmal nicht

bitte um antwort!
mfg Helix