Laufzeitfehler 318
29.01.2020 08:28:07
Patrik
Habe in meiner Excel-Datei einen Laufzeitfehler 318.
Der betroffene Code lautet:
Private Sub CommandButton1_Click()
Dim LRow As Long
Dim lzeile As Integer
With Sheets("Bestellungen")
LRow = .Cells(Rows.Count, 1).End(xlUp).Row
For lzeile = 2 To LRow
If .Cells(lzeile, 1) = ListBox1.List(ListBox1.ListIndex, 0) _
And .Cells(lzeile, 2) = ListBox1.List(ListBox1.ListIndex, 1) _
And .Cells(lzeile, 3) = ListBox1.List(ListBox1.ListIndex, 2) _
And .Cells(lzeile, 4) = ListBox1.List(ListBox1.ListIndex, 3) _
And .Cells(lzeile, 5) = ListBox1.List(ListBox1.ListIndex, 4) _
And .Cells(lzeile, 6) = ListBox1.List(ListBox1.ListIndex, 5) Then
.Cells(lzeile, 15) = txtb1.Text
.Cells(lzeile, 16) = txtb2.Text
txtb1.Text = ""
txtb2.Text = ""
Exit For
End If
Next lzeile
End With
Call CommandButton4_Click
End Sub
Es wird das fett geschriebene gelb markiert.Kann mir jemand weiterhelfen, was ich ändern muss?
Leider kann ich die Datei nicht hochladen, da die Datei viel zu gross ist.
Besten Dank.
Gruss Patrik