Laufzeitfehler 13 Typen unverträglich
11.02.2019 10:58:49
Georg
o. g. Fehlermeldung kommt an der Stelle im Code:
Zeile = .columns("B:B").....
Ich komm gerade nicht dahinter, wo der Fehler liegt, obwohl ich vermute er ist banal. Danke für eure Tipps. Georg
Sub WerteLöschen()
Dim rngSchicht As Range
Dim i As Long
Dim ltag As Date
Dim Zeile As Long
Dim eingabe As String
For i = 4 To 15
With ThisWorkbook.Worksheets(i)
.Cells.UnMerge
End With
Next i
Application.DisplayAlerts = False
For i = 4 To 15
With ThisWorkbook.Worksheets(i)
Zeile = .Columns("B:B").Find(What:="X", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Row
.Range("AX1").Value = Zeile
ltag = Day(DateSerial(Year(.Range("C3")), Month(.Range("C3")) + 1, 1) - 1)
Set rngSchicht = .Range(.Cells(7, 3), .Cells(Zeile, ltag + 2))
rngSchicht.ClearContents
End With
Next i
Application.DisplayAlerts = True
End Sub