Kann mir bitte jemand weiterhelfen.
Warum füllt sich die Textbox3 erst bei der zweiten Auswahl?
Bei der ersten Auswahl bleibt die TB3 leer, danach funktionierts.
Private Sub ComboBox1_Change()
Sheets("Tabelle1").Activate
Dim lngZeile As Long
lngZeile = ComboBox1.ListIndex + 3
If lngZeile > 0 Then
TextBox2.Value = Cells(lngZeile, 1).Value
TextBox3.Value = Cells(lngZeile, 4).Value
End If
If ComboBox1.MatchFound = True Then
ComboBox2.ListIndex = ComboBox1.ListIndex
End If
End Sub
Private Sub ComboBox2_Change()
Sheets("Tabelle1").Activate
Dim lngZeile As Long
lngZeile = ComboBox2.ListIndex + 3
If lngZeile > 0 Then
TextBox2.Value = Cells(lngZeile, 1).Value
TextBox3.Value = Cells(lngZeile, 4).Value
End If
If ComboBox2.MatchFound = True Then
ComboBox1.ListIndex = ComboBox2.ListIndex
End If
End Sub
Vielen Dank und Grüße
Gisela