online 1
gast (50)

/ Forum / Tabellenkalkulation

TabellenkalkulationTabellenkalkulation

Fragevon humline vom 15.10.2021, 11:34 Options

von Listbox in Textbox kopieren

hallo,

ich habe eine Listbox mit 7 spalten
wenn ich auf eins der datensätze klicke, würde ich gerne dass der ausgewählte datensatz in die textboxe 1 bis 7 übertragen wird.

scheitere momentan an folgender stelle..

For i = 1 To 7
boxnummer = 30 + i
UserForm1.Controls(TextBox & boxnummer).Text = UserForm1.ListBox2.List(iRow, i).Text

Next i

vielen Dank für die unterstützung


Antwort schreiben

Antwort 1 von Hajo_Zi vom 15.10.2021, 12:20 Options

Hallo,

Private Sub ListBox1_Change()
If ListBox1.Tag <> "" Then Exit Sub
TextBox1 = ListBox1.List(ListBox1.ListIndex, 0)
TextBox2 = ListBox1.List(ListBox1.ListIndex, 1)
TextBox3 = ListBox1.List(ListBox1.ListIndex, 2)
TextBox4 = ListBox1.List(ListBox1.ListIndex, 3)
TextBox5 = ListBox1.List(ListBox1.ListIndex, 4)
TextBox6 = ListBox1.List(ListBox1.ListIndex, 5)
TextBox7 = ListBox1.List(ListBox1.ListIndex, 6)
End Sub

Gruß Hajo

Ähnliche Themen

UserForm ListBox
fedjo  15.06.2008 - 165 Hits - 8 Antworten

Excel Listbox fuellen
Andi1986  20.06.2009 - 600 Hits - 2 Antworten

Listbox formatieren
Klapptnicht  03.09.2009 - 344 Hits - 2 Antworten

ListBox
bage  12.09.2009 - 123 Hits - 1 Antwort

variable textbox
gerrryy  14.10.2009 - 127 Hits - 4 Antworten

Hinweis

Diese Frage ist schon etwas älter, Sie können daher nicht mehr auf sie antworten. Sollte Ihre Frage noch nicht gelöst sein, stellen Sie einfach eine neue Frage im Forum..

Neue Einträge

Version: supportware 1.9.150 / 10.06.2022, Startzeit:Thu Jan 8 21:07:44 2026