Sub alleZeilen()
'also das Rad möchte ich nicht mehr neu erfinden
'dann eben über alle Zeilen die Funktion
Dim rngRow As Range, lngRow As Range
Dim strAll As String, blnEx As Boolean
For Each rngRow In Sheets("Tabelle A").UsedRange.Rows
If Not ABcompare("Tabelle A", "Tabelle B", "A:D", "A:D", rngRow.Row, rngRow.Row) Then
strAll = strAll & Chr(58) & CStr(rngRow.Row)
Select Case MsgBox("Ungleiche Zeile " & CStr(rngRow.Row), vbYesNo + vbExclamation, "Weiter suchen?")
Case vbYes
'na und?
Case vbNo
blnEx = Not blnEx
Exit For
End Select
End If
Next rngRow
If Len(strAll) > 0 Then
Call MsgBox(Replace(strAll, Chr(58), Chr(10)), vbOKOnly, "Gefunden in")
Exit Sub
End If
If Not blnEx Then _
Call MsgBox("keine Differenzen", vbOKOnly + vbInformation, "Congratulations")
End Sub
|