请教 这个错在哪
Private Sub Command1_Click()
Dim a As Single
Dim b As Single
Dim c As Single
Dim D As Single
Dim x1
Dim x2
a = Val(Text1.Text)
b = Val(Text2.Text)
c = Val(Text3.Text)
D = b * b - 4 * a * c
If a >= 0 Then
If D >= 0 Then
x1 = (-b + Sqr(D)) / (2 * a)
x2 = (-b - Sqr(D)) / (2 * a)
Else
x1 = "错误"
x2 = "错误"
Else
x1 = "错误"
x2 = "错误"
End If
Text4.Text = x1
Text5.Text = x2
End Sub