怎么使Text3.Text响应变化
Option Explicit
Private Sub Form_Load()
Text1.Text = "4"
Text2.Text = "2"
Text3.Text = "2"
End Sub
Private Sub Text3_Change()
Dim a As Single
Dim b As Single
Dim c As Single
a = CSng(Text1.Text)
b = CSng(Text2.Text)
c = a / b
c = CSng(Text3.Text)
End Sub
怎么使Text3.Text响应变化
[解决办法]
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 Text2Change()
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