Laufzeitfehler '13
17.01.2017 17:34:35
Floeh
Kann mir jemand weiterhelfen?
Der Fehler tritt auf wenn ich zuerst den Wert in die TextBox2 eintrage und anschl. TextBox1.
Es funktioniert bei der richtigen Reihenfolge.
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim BMI As String
BMI = CSng(CDbl(TextBox1.Value) / CDbl(TextBox2.Value / 100) ^ 2)
' Klassifikation nach WHO
Select Case BMI
Case Is 40
TextBox3.BackColor = &HC0&
Label4.Caption = "massive Adipositas"
End Select
TextBox3.Value = Format(BMI, "0.0")
TextBox1.SetFocus
End Sub
Anzeige