Hallo,
Ik wil graag bij een uitvoer van een commandbutton textboxen controleren als deze zijn ingevuld en als dat klopt moet hij subtotalen uitrekenen en een totaal uitrekenen. Als niet alle textboxen zijn ingevuld wil ik graag dat er een messagebox voor komt met dat niet alle velden zijn ingevuld.
Deze code heb ik nu staan maar krijg ik de volgende fout melding:
Compileerfout:
Blok If zonder End If
Kan iemand mij helpen om deze fout melding kloppend te krijgen??
Ik wil graag bij een uitvoer van een commandbutton textboxen controleren als deze zijn ingevuld en als dat klopt moet hij subtotalen uitrekenen en een totaal uitrekenen. Als niet alle textboxen zijn ingevuld wil ik graag dat er een messagebox voor komt met dat niet alle velden zijn ingevuld.
Deze code heb ik nu staan maar krijg ik de volgende fout melding:
Compileerfout:
Blok If zonder End If
Code:
Private Sub BERKMOM1Optellen_Click()
If BERKMOM1Aantal_1 <> "" Then
If BERKMOM1Aantal_2 <> "" Then
If BERKMOM1Aantal_3 <> "" Then
If BERKMOM1Aantal_4 <> "" Then
If BERKMOM1Aantal_5 <> "" Then
If BERKMOM1Aantal_6 <> "" Then
If BERKMOM1Aantal_7 <> "" Then
If BERKMOM1Aantal_8 <> "" Then
If BERKMOM1Aantal_9 <> "" Then
'doorgaan
Else
MsgBox "Je hebt niet alle aantal velden ingevuld"
End If
BERKMOM1Subtotaal_1.Text = "€ " + FormatNumber((CDbl(BERKMOM1Prijs_1.Text) * CDbl(BERKMOM1Aantal_1.Text)), 2)
BERKMOM1Subtotaal_2.Text = "€ " + FormatNumber((CDbl(BERKMOM1Prijs_2.Text) * CDbl(BERKMOM1Aantal_2.Text)), 2)
BERKMOM1Subtotaal_3.Text = "€ " + FormatNumber((CDbl(BERKMOM1Prijs_3.Text) * CDbl(BERKMOM1Aantal_3.Text)), 2)
BERKMOM1Subtotaal_4.Text = "€ " + FormatNumber((CDbl(BERKMOM1Prijs_4.Text) * CDbl(BERKMOM1Aantal_4.Text)), 2)
BERKMOM1Subtotaal_5.Text = "€ " + FormatNumber((CDbl(BERKMOM1Prijs_5.Text) * CDbl(BERKMOM1Aantal_5.Text)), 2)
BERKMOM1Subtotaal_6.Text = "€ " + FormatNumber((CDbl(BERKMOM1Prijs_6.Text) * CDbl(BERKMOM1Aantal_6.Text)), 2)
BERKMOM1Subtotaal_7.Text = "€ " + FormatNumber((CDbl(BERKMOM1Prijs_7.Text) * CDbl(BERKMOM1Aantal_7.Text)), 2)
BERKMOM1Subtotaal_8.Text = "€ " + FormatNumber((CDbl(BERKMOM1Prijs_8.Text) * CDbl(BERKMOM1Aantal_8.Text)), 2)
BERKMOM1Subtotaal_9.Text = "€ " + FormatNumber((CDbl(BERKMOM1Prijs_9.Text) * CDbl(BERKMOM1Aantal_9.Text)), 2)
BERKMOM1Totaal.Text = "€ " + FormatNumber((CDbl(BERKMOM1Subtotaal_1.Text) + CDbl(BERKMOM1Subtotaal_2.Text) + CDbl(BERKMOM1Subtotaal_3.Text) + CDbl(BERKMOM1Subtotaal_4.Text) + CDbl(BERKMOM1Subtotaal_5.Text) + CDbl(BERKMOM1Subtotaal_6.Text) + CDbl(BERKMOM1Subtotaal_7.Text) + CDbl(BERKMOM1Subtotaal_8.Text) + CDbl(BERKMOM1Subtotaal_9.Text)), 2)
End Sub
Kan iemand mij helpen om deze fout melding kloppend te krijgen??
