Also dann stimmt der Wert dort nicht ueberein. Wenn du 100% sicher bist, dass der Wert uebereinstimmt (suchst du auch in der richtigen Zelle?), dann kannst du nochmal versuchen, das ganze ohne And zu machen mit 2 If Abfragen. Kommt im Prinzip aufs gleiche raus, nur ein anderer Weg.
For Anzahl = 1 To AnzahlTB
For zeile = ZeileMax To 1 Step -1
If .Cells(zeile, 1).value = UserForm2.ComboBox1.value Then
If .Cells(zeile, 13).value = UserForm2.ComboBox4.value Then
Anzahl = Anzahl + 1
.Rows(zeile).Delete
End If
Else
f = MsgBox("Durchsuche Zeile: " & zeile & Chr(13) & .Cells(zeile, 1).value & .Cells(zeile, 13).value & Chr(13) & UserForm2.ComboBox1.value & UserForm2.ComboBox4.value, vbOKOnly, "Info")
End If
If Anzahl = AnzahlTB Then Exit For
If zeile = 1 Then i = MsgBox("BLAAAAA", vbCritical, "Error!")
If i = vbOK Then Exit Sub
Next zeile
Next Anzahl
Gruss T
|