"ZielPerson.AddItem" fügt nur eine LEERE Zeile in die Listbox.
So ist es korrekt:
With Ersetzung 'WOZU DAS DENN
For i = 11 To 1000 STEP 7
If Cells(1, i) = "" Then Exit For
ZielPerson.AddItem Cells(1, i)
Next
End With 'WOZU DAS DENN
With/End With benutzt man nur, um sich nicht dauernd wiederholen zu müssen. z.B. statt
Tabelle1.Cells(3,4)=Tabelle1.Cells(3,7)
Tabelle1.Cells(3,5)=Tabelle1.Cells(3,2)
Tabelle1.Cells(3,6)=Tabelle1.Cells(3,5)
Tabelle1.Cells(3,8)=Tabelle1.Cells(3,1)
Das hier:
With Tabelle1
.Cells(3,4)=.Cells(3,7)
.Cells(3,5)=.Cells(3,2)
.Cells(3,6)=.Cells(3,5)
.Cells(3,8)=.Cells(3,1)
End with
Aber in deinem Code ist das Blödsinn. :)
|