Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
404to408
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
404to408
404to408
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
ListBox zeigt nur 34 Datensätze von 400 an!
400
Hallo Leute, ich hoffe, mir kann jemand helfen. Ich habe in einem Userform eine Listbox mit folgendem Code:
'Listenfeld einrichten
Dim r As Variant
ListBox1.ColumnCount = 41
r = Cells(65536, 2).End(xlUp).Row
ListBox1.RowSource = "A2:AO" & r

Private Sub ListBox1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
On Error GoTo 1
ListBox1.SetFocus
'tpk = 1
ListBox1.BoundColumn = 1
Zeile.Value = ListBox1.Value
ListBox1.BoundColumn = 2
txtlaufendeNummer.Value = ListBox1.Value
ListBox1.BoundColumn = 3
txtAnlagennummer.Value = ListBox1.Value
ListBox1.BoundColumn = 4
txtBeschreibung1.Value = ListBox1.Value
ListBox1.BoundColumn = 5
txtBeschreibung2.Value = ListBox1.Value
ListBox1.BoundColumn = 6
txtStandort.Value = ListBox1.Value
ListBox1.BoundColumn = 7
cboAnlagenklasse.Value = ListBox1.Value
ListBox1.BoundColumn = 8
cboAnlagensachgruppe.Value = ListBox1.Value
ListBox1.BoundColumn = 9
cboKostenstelle = ListBox1.Value
ListBox1.BoundColumn = 10
cboProdukt.Value = ListBox1.Value
ListBox1.BoundColumn = 11
txtAnlagenstandort = ListBox1.Value
ListBox1.BoundColumn = 13
txtSeriennummer.Value = ListBox1.Value
ListBox1.BoundColumn = 14
cboAfaBuchcode.Value = ListBox1.Value
ListBox1.BoundColumn = 15
cboAnlagenbuchungsgruppe.Value = ListBox1.Value
ListBox1.BoundColumn = 16
cboKRAnlagenbuchungsgruppe.Value = ListBox1.Value
ListBox1.BoundColumn = 17
cboAfaMethode.Value = ListBox1.Value
ListBox1.BoundColumn = 18
txtStartdatumAfa.Value = ListBox1.Value
ListBox1.BoundColumn = 19
txtNutzungsdauer.Value = ListBox1.Value
ListBox1.BoundColumn = 20
cboVerzinsung.Value = ListBox1.Value
ListBox1.BoundColumn = 21
cboEigenkapitalzinssatz.Value = ListBox1.Value
ListBox1.BoundColumn = 22
cboRestwertbildung.Value = ListBox1.Value
ListBox1.BoundColumn = 23
txtStartdatumVerzinsung.Value = ListBox1.Value
ListBox1.BoundColumn = 24
cboHauptanlageUnteranlage.Value = ListBox1.Value
ListBox1.BoundColumn = 25
cboHauptanlagennummer.Value = ListBox1.Value
ListBox1.BoundColumn = 26
txtReserve1.Value = ListBox1.Value
ListBox1.BoundColumn = 27
txtReserve2.Value = ListBox1.Value
ListBox1.BoundColumn = 29
txtAnlagedatumAKHK.Value = ListBox1.Value
ListBox1.BoundColumn = 30
txtBelegnummer1.Value = ListBox1.Value
ListBox1.BoundColumn = 31
txtBeschreibung3.Value = ListBox1.Value
ListBox1.BoundColumn = 32
txtAnschaffungskosten.Value = ListBox1.Value
ListBox1.BoundColumn = 33
cboAfaBuchcode = ListBox1.Value
ListBox1.BoundColumn = 34
cboAnlageBuchungsart1.Value = ListBox1.Value
ListBox1.BoundColumn = 36
txtAnlagedatumAfa.Value = ListBox1.Value
ListBox1.BoundColumn = 37
txtBelegnummer2.Value = ListBox1.Value
ListBox1.BoundColumn = 38
txtBeschreibung4.Value = ListBox1.Value
ListBox1.BoundColumn = 39
txtAbschreibungsbetrag.Value = ListBox1.Value
ListBox1.BoundColumn = 40
cboAfaBuchcode.Value = ListBox1.Value
ListBox1.BoundColumn = 41
cboAnlageBuchungsart2.Value = ListBox1.Value
1:
End Sub

Jetzt ist es leider so, dass die Listbox mir von 400 Datensätzen nur die ersten 34 anzeigt! Was mache ich falsch? Wo muss ich was ändern? Ich hoffe, mir kann jemand helfen!
Gruß
Stefan

2
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Benutzer
Anzeige
AW: ListBox zeigt nur 34 Datensätze von 400 an!
26.03.2004 07:22:01
400
A bis AO" macht 34 ?
AW: ListBox zeigt nur 34 Datensätze von 400 an!
26.03.2004 07:28:35
400
Hallo Stefan,
auweia ;-)
Mal was Grundlegendes: Du kannst ein Steuerelement entweder mit der RowSource-Anweisung binden (bei UserForms nicht empfehlenswert) oder die Werte einlesen, nicht beides.
Das Einlesen der Werte ist einfachst, wenn Du schreibst:
ListBox1.ColumnCount = 41
ListBox1.List = Range("A2:AO" & r).Value
Danach kommt die Wertezuweisung zu den TextBoxes, die Du der Einfachheit halber einfach nur im Namen durchnumerieren solltest, zb. txt1, txt2 usw.
Diese Vorgehensweise ermöglicht es Dir, die TextBoxes über eine Schleife anzusprechen. Hierzu gibt es in der Excel-FAQ im Abschnitt Dialog einge ganze Reihe Beispiele.
Gruss hans
Anzeige

314 Forumthreads zu ähnlichen Themen

Anzeige
Anzeige
Anzeige

Links zu Excel-Dialogen

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige