Hallo,
habe gerade ein Problem, und zwar komm ich momentan beim Programmieren nicht weiter.
Ich programmiere im Moment einen Bußgeldrechner.
Bei der IF-Funktion habe ich jetzt mehrere Bedingungen.
vy = txt_kmh.Text
If rbtn_innerhalb.Checked = True And vy <= 10 Then MsgBox("Es ist ein" & _
"Bußgeld in Höhe von 15€ zu erwarten", MsgBoxStyle.Information)
If rbtn_innerhalb.Checked = True And 15 < vy <= 20 Then MsgBox("Es ist" & _
"ein Bußgeld in Höhe von 25€ zu erwarten", MsgBoxStyle.Information)
If rbtn_innerhalb.Checked = True And 15 < vy <= 20 Then MsgBox("Es ist" & _
"ein Bußgeld in Höhe von 35€ zu erwarten", MsgBoxStyle.Information)
If rbtn_innerhalb.Checked = True And 20 < vy <= 25 Then MsgBox("Es ist" & _
"ein Bußgeld in Höhe von 80€ und 1 Punkt zu erwarten", _
MsgBoxStyle.Information)
If rbtn_innerhalb.Checked = True And 25 < vy <= 30 Then MsgBox("Es ist" & _
"ein Bußgeld in Höhe von 100€ und 3 Punkte zu erwarten", _
MsgBoxStyle.Information)
If rbtn_innerhalb.Checked = True And 30 < vy <= 40 Then MsgBox("Es ist" & _
"ein Bußgeld in Höhe von 160€, 3 Punkte und 1 Monat Fahrverbot zu" & _
"erwarten ", MsgBoxStyle.Information)
If rbtn_innerhalb.Checked = True And 40 < vy <= 50 Then MsgBox("Es ist" & _
"ein Bußgeld in Höhe von 200€, 4 Punkte und 1 Monat Fahrverbot zu" & _
"erwarten ", MsgBoxStyle.Information)
If rbtn_innerhalb.Checked = True And 50 < vy <= 60 Then MsgBox("Es ist" & _
"ein Bußgeld in Höhe von 280€, 4 Punkte und 2 Monate Fahrverbot zu" & _
"erwarten ", MsgBoxStyle.Information)
If rbtn_innerhalb.Checked = True And 60 < vy <= 70 Then MsgBox("Es ist" & _
"ein Bußgeld in Höhe von 480€, 4 Punkte und 3 Monate Fahrverbot zu" & _
"erwarten ", MsgBoxStyle.Information)
If rbtn_innerhalb.Checked = True And 70 <= vy Then MsgBox("Es ist ein" & _
"Bußgeld in Höhe von 680€, 4 Punkte und 3 Monate Fahrverbot zu erwarten" & _
"", MsgBoxStyle.Information) Ist der vy-Wert z.b. 16, gibt er mir alle Messageboxen >16 nacheinander aus.
Hat vielleicht jemand eine Idee?
Danke im Vorraus |