VB: Loop error
21.11.2006 14:22:40
Johannes
ich habe in meinem Programm das Problem, dass er keine Do ... Loop While Schleife erkennt, wenn ich eine if anweisung in die Schleife einbaue. Ich bekomme immer den Fehler, fehlendes Do bei Loop while anweisung.
Kann mir jemand da aushelfen?
Der Programmcode:
Do
UpperRow = ActiveCell.Value
Cells(ActiveCell.Row + 1, "A").Select
LowerRow = ActiveCell.Value
If LowerRow = UpperRow Then
ActiveCell.EntireRow.Select
Selection.Copy
Cells(ActiveCell.Row - 1, "A").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlAdd, SkipBlanks:= _
False, Transpose:=False
Cells(ActiveCell.Row + 1, "A").Select
Selection.Delete Shift:=xlUp
Loop While UpperRow 0