vb撰寫程序中
Private Sub Text19_Click()
Dim x As Long
If 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
顯示數字溢位怎么辦?
求解答,謝謝
uj5u.com熱心網友回復:
先看你輸入什么數字了uj5u.com熱心網友回復:
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
就可以了
uj5u.com熱心網友回復:
把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
uj5u.com熱心網友回復:
嗯嗯,可以了,非常感謝轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/21800.html
標籤:VB基礎類
上一篇:VB獲取IE臨時檔案夾
