Heute ist irgendwie nicht mein Tag. Alles was ich beim programmieren anpacke geht irgendwie schief. Wieder ein Problem.
Ich habe 12 ComboBoxen in einer UserForm. Ich will, angefangen ab ComboBox3, dass die nachfolgende ComboBox einen groeseren Wert haben soll als die ComboBox zuvor. Bei meinem Makro erschient immer die Meldung, dass ComboBox5 groesser ist als ComboBox6. Die Anzeige kommt auch, wenn ComboBox5 gar nicht groesser ist als ComboBox6. Das ist zum Maeusemelken.
Hier mein Code:
' Eingabe der ComboBox muss kleiner sein, als ComboBox danach
'
'
Dim iCounter02 As Integer
For iCounter02 = 3 To 11
With UserForm2("ComboBox" & iCounter02)
If Not UserForm2("ComboBox" & iCounter02) UserForm2("ComboBox" & iCounter02 + 1) Then
MsgBox "Date in ComboBox" & iCounter02 & " is bigger" & Chr(13) & _
"or equal than date in ComboBox" & iCounter02 + 1 & " !"
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
Exit Sub
End If
End With
Next iCounter02
Sub und End
Sub sind gesetzt.
Vielen Dank im Voraus
Ciao
Gnilk