Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

ListBox füllen

Forumthread: ListBox füllen

ListBox füllen
09.02.2004 13:28:49
Beni
Hallo Excel-Freaks,
wenn ich mit dem nachfolgenden Code eine ListBox fülle, so kommt ab Spalte11 der Laufzeitfehler "380"
Eigenschaft List konnte nicht gesetzt werden. Ungültiger Eigenschaftswert.
Woran liegt das und wie kann man das umgehen.
Gruss Beni
ListBox1.ColumnCount = 16
i = 0
ListBox1.AddItem Cells(r, 1)
ListBox1.List(i, 1) = Cells(r, 2)
ListBox1.List(i, 2) = Cells(r, 3)
ListBox1.List(i, 3) = Cells(r, 4)
ListBox1.List(i, 4) = Cells(r, 5)
ListBox1.List(i, 5) = Cells(r, 6)
ListBox1.List(i, 6) = Cells(r, 7)
ListBox1.List(i, 7) = Cells(r, 8)
ListBox1.List(i, 8) = Cells(r, 9)
ListBox1.List(i, 9) = Cells(r, 10)
ListBox1.List(i, 10) = Cells(r, 11)<<<<<<
istBox1.List(i, 12) = Cells(r, 13)
ListBox1.List(i, 13) = Cells(r, 14)
ListBox1.List(i, 14) = Cells(r, 15)
ListBox1.List(i, 15) = Cells(r, 16)
Anzeige

4
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: ListBox füllen
09.02.2004 13:34:00
xXx
Hallo,
warum so kompliziert? Listboxe haben die igenschaft ListFillRange' Den kannst du einfach zuweisen:
ListBox1.ListfillRange="Tabelle1!A1:A16"
Gruß aus'm Pott
Udo
http://www.excelerator.de

P.S. Das Forum lebt auch von den Rückmeldungen an die Antworter!
Anzeige
AW: ListBox füllen
09.02.2004 13:46:21
Beni
Hallo Udo,
die Variante kenne ich schon, hier ein weiterteil des Code's
Gruss Beni
ListBox1.ColumnCount = 16
i = 0
If TextBox1.Value <> "" Then
S = 1
Wert = TextBox1.Value & "*"
With Worksheets(1).Columns(S)
Set C = .Find(Wert, LookIn:=xlValues, LookAt:=xlWhole)
r = C(1, 1).Row
ListBox1.AddItem Cells(r, 1)
ListBox1.List(i, 1) = Cells(r, 2)
ListBox1.List(i, 2) = Cells(r, 3)
usw.
Anzeige
AW: ListBox füllen
09.02.2004 13:55:13
K.Rola
Hallo,
eine ungebundene Listbox kann max. 10 Spalten haben, wenn du mehr
brauchst, geht nur mit Rowsource bzw. Listfillrange
Gruß K.Rola
AW:Danke
09.02.2004 14:43:07
Beni
Hallo,
Danke für die schnelle Antwort.
Gruss Beni
;

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Entdecke mehr
Finde genau, was du suchst

Die erweiterte Suchfunktion hilft dir, gezielt die besten Antworten zu finden

Suche nach den besten Antworten
Unsere beliebtesten Threads

Entdecke unsere meistgeklickten Beiträge in der Google Suche

Top 100 Threads jetzt ansehen
Anzeige