Wo ist mein Gedankenfehler?
Matthias
folgender Code funktioniert nicht , bitte um Hilfe:
Option Explicit
Private Sub ZelleJa() 'Wenn Zelle "JA" enthält , loesche die Zelle in...
Dim RaBereich As Range ' Variable Bereich
Dim RaZelle As Range ' Variable Zelle
Dim lngZ As Long ' Zeile der Zelle
Set RaBereich = Intersect(Range("P4:P33"), Target)
If Not RaBereich Is Nothing Then
Application.EnableEvents = False
For Each RaZelle In RaBereich
lngZ = RaZelle.Row
If UCase(RaZelle.Value) = "JA" Then 'DAS "JA wird über eine Wennfunktion in die Zelle _
geschrieben
Worksheets("Programm").Cells(lngZ, 3).ClearContents
End If
Next RaZelle
Application.EnableEvents = True
End If
Set RaBereich = Nothing ' Variable leeren
End Sub
Dank vorabGruß Matthias