Private Sub berechneMittelwertMitUeberpruefung_Click()
On Error GoTo Fehlerbehandlung
Dim Zahl1 As Double
Dim Zahl2 As Double
Dim Mittelwert As Double
Zahl1 = wandle_in_double_um(Zahl1Input.Text)
Zahl2 = wandle_in_double_um(Zahl2Input.Text)
Mittelwert = (Zahl1 + Zahl2) / 2
MittelwertOutput.Text = Mittelwert
Exit Sub
Fehlerbehandlung:
MsgBox ("Fehler: " & Err.Description)
End Sub