vb编写过程中
Private Sub Text19_Click()
Dim x As LongIf IsNumeric(Text15.Text) = flase Or Text15.Text = "" Then Exit Sub
If IsNumeric(Text16.Text) = flase Or Text16.Text = "" Then Exit Sub
x = Val(Text15.Text) * Val(Text16.Text) ^ 3 / 12
Text19.Text = x
End Sub
显示数字溢出怎么办?
求解答,谢谢

解决方案 »

  1.   

    If IsNumeric(Text15.Text) = flase Or Text15.Text = "" Then Exit Sub应该是 
    If IsNumeric(Text15.Text) = False  Or Text15.Text = "" Then Exit Sub不过应该用 IF (Not IsNumeric(Text15.Text) ) Then Exit Sub
    就可以了
      

  2.   

    把X定义成double 
    Private Sub Text19_Click()
        Dim x As Double
        If IsNumeric(Text15.Text) = False Or Text15.Text = "" Then Exit Sub
        If IsNumeric(Text16.Text) = False Or Text16.Text = "" Then Exit Sub
        x = Val(Text15.Text) * Val(Text16.Text) ^ 3 / 12
        Text19.Text = x
    End Sub