AW: passwort ändern
09.07.2007 15:11:57
Chaos
Servus Holger,
das kann man z.B., so lösen, dass man keine doppelten Passwörter bekommt.
Private Sub CommandButton1_Click()
If TextBox1 = PWort Then
Dim c As Integer, zeil As Integer
c = Sheets("PW").Range("A65536").End(xlUp).Offset(0, 0).Row
For zeil = c To 2 Step -1
If Sheets("PW").Cells(zeil, 3).Value = TextBox2 Then
MsgBox "das nue Passwort ist unzulässig! Bitte ein anderes Passwort eingeben!"
TextBox2 = ""
TextBox3 = ""
Exit Sub
End If
Next zeil
If TextBox2 = TextBox3 Then
Set PWCell = Sheets("PW").Columns(3).Find(PWort)
Sheets("PW").Cells(PWCell.Row, 3) = TextBox3
PWort = PWCell
MsgBox "Passwort wurde geändert !"
Else
MsgBox "Keine Übereinstimmung des neuen Passwortes !"
End If
Else
MsgBox "Falsches Passwort !"
End If
Unload Me
End Sub
Gruß
Chaos