geht nur manchmal
16.04.2003 08:42:09
Matthias H.
Hallo Rainer,Entweder wird der Text in Comboboxen gelöscht, obwohl er in der Range (P2:P5) vorkommt, oder es tritt das Gegenteil ein, d.h. der falsche Text bleibt stehen.
Ich habe die Schleife nochmal weggelassen, aber selbst dann funktioniert es nur sporadisch:
If ComboBox1.Text = Cells(2, 16) Or ComboBox1.Text = Cells(3, 16) Or ComboBox1.Text = Cells(4, 16) Or ComboBox1.Text = Cells(5, 16) Then
ComboBox1.Text = ComboBox1.Text
Else
ComboBox1.Text = "ändern"
End If
If ComboBox2.Text = Cells(2, 16) Or ComboBox1.Text = Cells(3, 16) Or ComboBox1.Text = Cells(4, 16) Or ComboBox1.Text = Cells(5, 16) Then
ComboBox2.Text = ComboBox2.Text
Else
ComboBox2.Text = "ändern"
End If
If ComboBox3.Text = Cells(2, 16) Or ComboBox1.Text = Cells(3, 16) Or ComboBox1.Text = Cells(4, 16) Or ComboBox1.Text = Cells(5, 16) Then
ComboBox3.Text = ComboBox3.Text
Else
ComboBox3.Text = "ändern"
End If
If ComboBox4.Text = Cells(2, 16) Or ComboBox1.Text = Cells(3, 16) Or ComboBox1.Text = Cells(4, 16) Or ComboBox1.Text = Cells(5, 16) Then
ComboBox4.Text = ComboBox4.Text
Else
ComboBox4.Text = "ändern"
End If
...