Ich habe ein kleines Tool geschrieben für eine Berechnung. Es funktioniert auch. Aber jetzt benötige ich Hilfe. Wenn ich CommandButton2 clicke startet die Berechnung. Aber Textbox12 wird oft vergessen zu befüllen und dann startet das Makro nicht.
meine Idee wäre eine wenn dann Abfrage und mit Hilfe der Inputbox kann dann der Wert für die Textbox12 eingetragen werden und das Makro läuft weiter
Hier der Berechungsteil und ein Link zur Testversion
Private Sub CommandButton2_Click()
If TextBox1 "" And ComboBox1 "" And ComboBox9 "" And TextBox4 "" Then TextBox6. _
Value = CCur(TextBox1) * CCur(ComboBox1) * CCur(ComboBox9) * CCur(TextBox4) / 100
If TextBox6 "" Then TextBox8.Value = CCur(TextBox6)
Dim c As Long, d As Long
c = CCur(TextBox8)
TextBox6 = TextBox8
If ComboBox8 "" Then TextBox9.Value = CCur(TextBox5) + CCur(TextBox8) - CCur(TextBox7)
If ComboBox8 "" Then TextBox11.Value = CCur(TextBox9) * (CCur(TextBox12) / 100)
If ComboBox8 "" Then TextBox10.Value = CCur(TextBox3)
If ComboBox8 "" Then Label18.Caption = CCur(TextBox11) + CCur(TextBox10)
End Sub
https://www.herber.de/bbs/user/47368.xls
Danke für die Hilfe im Voraus
Gruß Peter Knierim