Matthias u. Uwe habe mir sehr geholfen, dieses Makro funktioniert auch:
Sub Tabellenblatt_loeschen()
Application.ScreenUpdating = False
Dim WS As Worksheet
On Error GoTo ErrExit
For Each WS In ThisWorkbook.Worksheets
If WS.Range("L1").Text = "71" And "07" Then
Application.DisplayAlerts = False
''WS.Delete
Application.DisplayAlerts = True
End If
Else
' MsgBox "nicht vorhanden"
End If
Next
Exit Sub
ErrExit:
Application.DisplayAlerts = True
MsgBox "mind. ein Blatt muß vorhanden bleiben" _
& vbLf & "Da dies das letzte Blatt ist und auch" & _
"hier in C4 ""01"" steht, wird das Löschen abgebrochen"
On Error GoTo 0
End Sub
Ich möchte gern jetzt verschiedene Tabellen prüfen, z.B.
"71" And "07" also alle Tabellen wenn 71 oder 07 drin steht.
Ich bitte noch einmal um Hilfe,
danke
mfg Kurt aus K