ListBox_Change
01.12.2015 15:11:35
Dirk
ich habe folgendes Problem :
Ich fülle Combo- & Textboxen über ListBox_Change(). In Abhängigkeit des Inhaltes
einer somit gefüllten Combobox sollen 2 Checkboxen angesprochen werden (wenn Combo-
Box1="Firma", dann CheckBox2=True; wenn ComboBox1"Firma", dann CheckBox1=True.
Klappt soweit ganz gut, nur daß CheckBox1 ("Firma") immer erst beim zweiten ListBox_Change der Haken gesetzt wird.
Für mich ein unlösbares Problem, für Euch wahrscheinlich ein Klacks.
Vielen Dank im Voraus.
Private Sub ListBox1_Change()
On Error Resume Next
If ListBox1.Tag "" Then Exit Sub
ComboBox1 = ListBox1.List(ListBox1.ListIndex, 0)
TB03 = ListBox1.List(ListBox1.ListIndex, 1)
TB02 = ListBox1.List(ListBox1.ListIndex, 2)
TB04 = ListBox1.List(ListBox1.ListIndex, 3)
TB05 = ListBox1.List(ListBox1.ListIndex, 4)
TB06 = ListBox1.List(ListBox1.ListIndex, 5)
TB07 = ListBox1.List(ListBox1.ListIndex, 6)
TB58 = ListBox1.List(ListBox1.ListIndex, 10)
If ComboBox1.Value = "Firma" Then
CB01.Value = False
CB02.Value = True
End If
If ComboBox1.Value "Firma" Then
CB01.Value = True
CB02.Value = False
End If
End Sub