Option
Explicit
Public
Sub
Erledigte_Grün_löschen()
Dim
objListRow
As
ListRow, objUnion
As
Range
For
Each
objListRow
In
ActiveSheet.ListObjects(
"Tabelle1"
).ListRows
With
objListRow
If
.Range.Cells(1, 1).DisplayFormat.Interior.Color = &H50D092
Then
If
objUnion
Is
Nothing
Then
Set
objUnion = .Range
Else
Set
objUnion = Union(objUnion, .Range)
End
If
End
If
End
With
Next
If
objUnion
Is
Nothing
Then
Call
MsgBox(Prompt:=
"Markierung nicht vorhanden, "
& _
"Spalte wird nicht gelöscht...!"
, Buttons:=vbExclamation)
Else
If
MsgBox(Prompt:=
"Markierung gefunden, möchten Sie die Auswahl wirklich löschen..?"
, _
Buttons:=vbQuestion + vbYesNo) = vbYes
Then
Call
objUnion.Delete
Set
objUnion =
Nothing
End
If
End
Sub