Ich wurde heute schon von Matthias geholfen mit diesem Code.
Private Sub ComboBox13_Change()
Dim lz As Long, i As Long, sp As Integer
Dim anz As Integer
ListBox3.Clear
Label152.Caption = ComboBox13.Value
'Label153.Caption = ListBox3.ListIndex --->hier ligt mein Problem
With Sheets("AGH")
lz = .Range("C65536").End(xlUp).Row
For i = 3 To lz
If InStr(.Cells(i, 3).Value, ComboBox13.Value) > 0 And .Cells(i, 13).Value = "offen" Then
ListBox3.AddItem .Cells(i, 3)
anz = ListBox3.ListCount - 1
For sp = 1 To 7
ListBox3.List(anz, 1) = .Cells(i, 2).Value 'Träger
ListBox3.List(anz, 2) = .Cells(i, 4).Value 'Träger-Nr
ListBox3.List(anz, 3) = .Cells(i, 5).Value 'Maßn-Nr
ListBox3.List(anz, 4) = .Cells(i, 6).Value 'SteA-Nr
ListBox3.List(anz, 5) = .Cells(i, 7).Value 'von
ListBox3.List(anz, 6) = .Cells(i, 8).Value 'bis
ListBox3.List(anz, 7) = .Cells(i, 14).Value 'offen
Next sp
End If
Next i
End With
End Sub
Ich möchte aus der ListBox3 Spalte 6 die "SteA-Nr" in mein Label übernehmen.
Geht das überhaupt zu machen, und wenn ja, wie müßte der Code dahingehend geändert werden.
Nochmals Tausend Dank für Eure Bemühungen
Gruß Andreas