怎么Text2.Text没有响应变化
本帖最后由 bcrun 于 2013-03-25 17:28:42 编辑
Private Sub Form_Load()
Text1.Text = "8"
Text2.Text = "2"
Text3.Text = "4"
End Sub
Private Sub Text1_Change()
Dim a As Single
Dim b As Single
Dim c As Single
On Error GoTo errhandler
a = CSng(Text1.Text)
b = CSng(Text2.Text)
c = a / b
Text3.Text = CStr(c)
errhandler:
End Sub
Private Sub Text2_Change()
Dim a As Single
Dim b As Single
Dim c As Single
On Error GoTo errhandler
a = CSng(Text1.Text)
b = CSng(Text2.Text)
c = a / b
Text3.Text = CStr(c)
errhandler:
End Sub
Private Sub Text3_Change()
Dim a As Single
Dim b As Single
Dim c As Single
On Error GoTo errhandler
a = CSng(Text3.Text)
b = CSng(Text1.Text)
c = b / a
Text2.Text = CStr(c)
errhandler:
End Sub