关于一个比较问题???
代码如下,再简单不过了,不好意思没注释
Private Sub Tex1_Change()
Call compary(Tex1, Lab1, Label10)
End Sub
Private Sub compary(a As TextBox, b As Label, display As Label)
If b.Caption < a.text Then ----------------2
display.Caption = "too high!"
Else: Exit Sub
End If
End Sub
Private Sub Form_Load()
Lab1.Caption = 100000
End Sub
为什么我每次往textbox输入数时,到11就开始显示"too high!"
而当我把2改为if b.caption-a.text<0 then
就正确了