Typen unverträglich
15.12.2016 15:00:34
Kliewe
Damit etwas ausgeführt wird, müssen zwei Bedingungen unterschiedlichen Typs erfüllt sein, geht das nicht?! Hier der Code
Private Sub CommandButton13_Click()
'Prozent von Alternativ und Traditional muss 100 sein
If CheckBox3.Value = False And CheckBox4.Value = False And TextBox30.Value = "" Or CheckBox3.Value = False And CheckBox4.Value = False And TextBox63.Value = "" Then
MsgBox ("Fields must not be empty!")
TextBox30.BackColor = &HFFFF&
TextBox63.BackColor = &HFFFF&
ElseIf CheckBox3.Value = False And CheckBox4.Value = False And CDbl(TextBox30) + CDbl(TextBox63) 100 Then
MsgBox ("Your entries must be 100% in total!")
TextBox30.BackColor = &HFFFF&
TextBox63.BackColor = &HFFFF&
Else
TextBox30.BackColor = &H80000005
TextBox63.BackColor = &H80000005
End If
Probleme gibt es bei
ElseIf CheckBox3.Value = False And CheckBox4.Value = False And CDbl(TextBox30) + CDbl(TextBox63) 100 Then
Jemand einen Rat für mich?