ich hatte mir gedacht, dass nachstehender Code funktionieren müsste. Macht er aber nicht; er zeigt mir zwar die einzelnen Summen in Textbox10 an, aber addiert sie nicht zu einer Gesamtsumme. Was mache ich verkehrt? - Ich würde also gerne erreichen, dass,sofern die jeweilige CheckBox aktiviert ist, die Summe(n) addiert wird und das Gesamtergebnis in Textbox10 angezeigt wird. Danke schon jetzt wieder für die Rückmeldungen.
Herzliche Grüße
Wolfgang
Private Sub CommandButton9_Click()
OptionButton2.Value = True
If CheckBox1.Value = True Then
TextBox10.Value = TextBox26.Value
If CheckBox1.Value And CheckBox2.Value = True Then
TextBox10.Value = TextBox26.Value + TextBox29.Value
If CheckBox1.Value And CheckBox2.Value And CheckBox3.Value = True Then
TextBox10.Value = TextBox26.Value + TextBox29.Value + TextBox32.Value
If CheckBox1.Value And CheckBox2.Value And CheckBox3.Value And CheckBox4.Value = True Then
TextBox10.Value = TextBox26.Value + TextBox29.Value + TextBox32.Value + TextBox33.Value
End If
End If
End If
End If
End Sub