ich möchte gern die Datensätze Listbox in Labels anzeigen lassen allerdings tut sich da gar nichts.
Sieht so aus:
Private Sub TextBox2_Change()
Bestellung.Label9.Caption = ListBox2.Lis
(ListBox2.ListIndex, 0)
Bestellung.Label11.Caption = ListBox2.List(ListBox2.ListIndex, 1)
Bestellung.Label12.Caption = ListBox2.List(ListBox2.ListIndex, 2)
Bestellung.Label14.Caption = ListBox2.List(ListBox2.ListIndex, 3)
Bestellung.Label16.Caption = ListBox2.List(ListBox2.ListIndex, 4)
Bestellung.Label18.Caption = ListBox2.List(ListBox2.ListIndex, 5)
Bestellung.Label20.Caption = ListBox2.List(ListBox2.ListIndex, 6)
Bestellung.Label22.Caption = ListBox2.List(ListBox2.ListIndex, 7)
Bestellung.Label24.Caption = ListBox2.List(ListBox2.ListIndex, 8)
End Sub
Private Sub UserForm_Initialize()
With Bestellung.ListBox2
.ColumnCount = 9
.ColumnWidths = "125;0;0;0;0;0;0;0;0"
End With
With Bestellung
For i = 2 To Sheets("Sachbearbeiterstammdaten").UsedRange.Rows.Count
.ComboBox1.AddItem Sheets("Sachbearbeiterstammdaten").Cells(i, 1).Value
Next i
For i = 2 To Sheets("Lieferantenstammdaten").UsedRange.Rows.Count
.ListBox1.AddItem Sheets("Lieferantenstammdaten").Cells(i, 1).Value
Next i
For i = 2 To Sheets("Lieferantenstammdaten").UsedRange.Rows.Count
.ListBox2.AddItem Sheets("Lieferantenstammdaten").Cells(i, 1).Value
Next i
End With
End Sub
Kann mirjemand dabei helfen?
Danke schon mal
Andi