Alternative zu Exit Sub
13.02.2017 11:08:29
Rainer
ich befülle meine ComboBox wie folgt:
Dim iRow As Integer
With Me.CmbB2
.Text = ""
.ColumnCount = 3
.ColumnWidths = "70Pt;25Pt;20Pt"
'bis zur letzten Zeile mit Eintrag
For iRow = 7 To wks.Cells(Rows.Count, 24).End(xlUp).Row
.AddItem wks.Cells(iRow, 24).Value 'Spartentext
.List(.ListCount - 1, 1) = wks.Cells(iRow, 23).Value
.List(.ListCount - 1, 2) = iRow
If wks.Cells(iRow, 24).Value = "Ende" Then Exit Sub
Next iRow
End With
Wie kann ich "To ..." ändern, damit ich die Zeile
If wks.Cells(iRow, 24).Value = "Ende" Then Exit Sub
rausnehmen kann, die ja dann den gesamten Code abbricht.
Gruß Rainer